Changeset View
Changeset View
Standalone View
Standalone View
swh/web/browse/views/snapshot.py
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | @browse_route(r'snapshot/(?P<snapshot_id>[0-9a-f]+)/content/(?P<path>.+)/', | ||||
checksum_args=['snapshot_id']) | checksum_args=['snapshot_id']) | ||||
def snapshot_content_browse(request, snapshot_id, path): | def snapshot_content_browse(request, snapshot_id, path): | ||||
"""Django view that produces an HTML display of a content | """Django view that produces an HTML display of a content | ||||
collected in a snapshot. | collected in a snapshot. | ||||
The url that points to it is | The url that points to it is | ||||
:http:get:`/browse/snapshot/(snapshot_id)/content/(path)/` | :http:get:`/browse/snapshot/(snapshot_id)/content/(path)/` | ||||
""" | """ | ||||
return browse_snapshot_content(request, snapshot_id=snapshot_id, path=path) | language = request.GET.get('language', None) | ||||
return browse_snapshot_content(request, snapshot_id=snapshot_id, path=path, | |||||
selected_language=language) | |||||
@browse_route(r'snapshot/(?P<snapshot_id>[0-9a-f]+)/log/', | @browse_route(r'snapshot/(?P<snapshot_id>[0-9a-f]+)/log/', | ||||
view_name='browse-snapshot-log', | view_name='browse-snapshot-log', | ||||
checksum_args=['snapshot_id']) | checksum_args=['snapshot_id']) | ||||
def snapshot_log_browse(request, snapshot_id): | def snapshot_log_browse(request, snapshot_id): | ||||
"""Django view that produces an HTML display of revisions history (aka | """Django view that produces an HTML display of revisions history (aka | ||||
the commit log) collected in a snapshot. | the commit log) collected in a snapshot. | ||||
Show All 31 Lines |