Changeset View
Changeset View
Standalone View
Standalone View
swh/web/ui/views/browse.py
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | elif request.method == 'POST': | ||||
message = str(e) | message = str(e) | ||||
env['search_stats'] = search_stats | env['search_stats'] = search_stats | ||||
env['search_res'] = search_res | env['search_res'] = search_res | ||||
env['message'] = message | env['message'] = message | ||||
return render_template('search.html', **env) | return render_template('search.html', **env) | ||||
@app.route('/api/1/doc/') | @app.route('/browse/') | ||||
def browse(): | |||||
"""Render the user-facing browse view | |||||
""" | |||||
return render_template('browse.html') | |||||
@app.route('/api/') | |||||
def browse_api_doc(): | def browse_api_doc(): | ||||
"""Render the API's documentation. | """Render the API's documentation. | ||||
""" | """ | ||||
routes = apidoc.APIUrls.get_app_endpoints() | routes = apidoc.APIUrls.get_app_endpoints() | ||||
# Return a list of routes with consistent ordering | # Return a list of routes with consistent ordering | ||||
env = { | env = { | ||||
'doc_routes': sorted(routes.items()) | 'doc_routes': sorted(routes.items()) | ||||
} | } | ||||
▲ Show 20 Lines • Show All 764 Lines • Show Last 20 Lines |