Changeset View
Changeset View
Standalone View
Standalone View
swh/web/browse/views/release.py
# Copyright (C) 2017-2020 The Software Heritage developers | # Copyright (C) 2017-2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU Affero General Public License version 3, or any later version | # License: GNU Affero General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from django.shortcuts import render | from django.shortcuts import render | ||||
import sentry_sdk | import sentry_sdk | ||||
from swh.model.identifiers import CONTENT, DIRECTORY, RELEASE, REVISION, SNAPSHOT | from swh.model.identifiers import CONTENT, DIRECTORY, RELEASE, REVISION, SNAPSHOT | ||||
from swh.web.browse.browseurls import browse_route | from swh.web.browse.browseurls import browse_route | ||||
from swh.web.browse.snapshot_context import get_snapshot_context | from swh.web.browse.snapshot_context import get_snapshot_context | ||||
from swh.web.browse.utils import ( | from swh.web.browse.utils import ( | ||||
gen_revision_link, | gen_revision_link, | ||||
gen_link, | gen_link, | ||||
gen_snapshot_link, | gen_snapshot_link, | ||||
get_swh_persistent_ids, | |||||
gen_directory_link, | gen_directory_link, | ||||
gen_content_link, | gen_content_link, | ||||
gen_release_link, | gen_release_link, | ||||
gen_person_mail_link, | gen_person_mail_link, | ||||
) | ) | ||||
from swh.web.common import service | from swh.web.common import service | ||||
from swh.web.common.exc import NotFoundExc, handle_view_exception | from swh.web.common.exc import NotFoundExc, handle_view_exception | ||||
from swh.web.common.identifiers import get_swh_persistent_ids | |||||
from swh.web.common.typing import ReleaseMetadata | from swh.web.common.typing import ReleaseMetadata | ||||
from swh.web.common.utils import reverse, format_utc_iso_date | from swh.web.common.utils import reverse, format_utc_iso_date | ||||
@browse_route( | @browse_route( | ||||
r"release/(?P<sha1_git>[0-9a-f]+)/", | r"release/(?P<sha1_git>[0-9a-f]+)/", | ||||
view_name="browse-release", | view_name="browse-release", | ||||
checksum_args=["sha1_git"], | checksum_args=["sha1_git"], | ||||
▲ Show 20 Lines • Show All 204 Lines • Show Last 20 Lines |