Changeset View
Changeset View
Standalone View
Standalone View
swh/web/browse/views/directory.py
# Copyright (C) 2017-2021 The Software Heritage developers | # Copyright (C) 2017-2021 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 | ||||
import os | import os | ||||
import sentry_sdk | import sentry_sdk | ||||
from django.http import HttpResponse | from django.http import HttpResponse | ||||
from django.shortcuts import redirect, render | from django.shortcuts import redirect, render | ||||
from swh.model.identifiers import ObjectType | from swh.model.swhids import ObjectType | ||||
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 gen_link, get_directory_entries, get_readme_to_display | from swh.web.browse.utils import gen_link, get_directory_entries, get_readme_to_display | ||||
from swh.web.common import archive | from swh.web.common import archive | ||||
from swh.web.common.exc import NotFoundExc, http_status_code_message | from swh.web.common.exc import NotFoundExc, http_status_code_message | ||||
from swh.web.common.identifiers import get_swhids_info | from swh.web.common.identifiers import get_swhids_info | ||||
from swh.web.common.typing import DirectoryMetadata, SWHObjectInfo | from swh.web.common.typing import DirectoryMetadata, SWHObjectInfo | ||||
from swh.web.common.utils import gen_path_info, reverse, swh_object_icons | from swh.web.common.utils import gen_path_info, reverse, swh_object_icons | ||||
▲ Show 20 Lines • Show All 260 Lines • Show Last 20 Lines |