Changeset View
Changeset View
Standalone View
Standalone View
swh/web/browse/views/snapshot.py
Show All 24 Lines | def snapshot_browse(request, snapshot_id): | ||||
The url that points to it is :http:get:`/browse/snapshot/(snapshot_id)/` | The url that points to it is :http:get:`/browse/snapshot/(snapshot_id)/` | ||||
""" | """ | ||||
browse_snapshot_url = reverse('browse-snapshot-directory', | browse_snapshot_url = reverse('browse-snapshot-directory', | ||||
url_args={'snapshot_id': snapshot_id}, | url_args={'snapshot_id': snapshot_id}, | ||||
query_params=request.GET) | query_params=request.GET) | ||||
return redirect(browse_snapshot_url) | return redirect(browse_snapshot_url) | ||||
@browse_route(r'snapshot/(?P<snapshot_id>[0-9a-f]+)/directory/', | @browse_route(r'snapshot/(?P<snapshot_id>[0-9a-f]+)/directory/(?P<path>.+)/', | ||||
r'snapshot/(?P<snapshot_id>[0-9a-f]+)/directory/(?P<path>.+)/', | r'snapshot/(?P<snapshot_id>[0-9a-f]+)/directory/', | ||||
view_name='browse-snapshot-directory', | view_name='browse-snapshot-directory', | ||||
checksum_args=['snapshot_id']) | checksum_args=['snapshot_id']) | ||||
def snapshot_directory_browse(request, snapshot_id, path=None): | def snapshot_directory_browse(request, snapshot_id, path=None): | ||||
"""Django view for browsing the content of a directory collected | """Django view for browsing the content of a directory collected | ||||
in a snapshot. | in a snapshot. | ||||
The url that points to it is | The url that points to it is | ||||
:http:get:`/browse/snapshot/(snapshot_id)/directory/[(path)/]` | :http:get:`/browse/snapshot/(snapshot_id)/directory/[(path)/]` | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |