swh.web.admin.adminurls module

class swh.web.admin.adminurls.AdminUrls[source]

Bases: swh.web.common.urlsindex.UrlsIndex

Class to manage swh-web admin urls.

scope = 'admin'
swh.web.admin.adminurls.admin_route(*url_patterns, view_name=None)[source]

Decorator to ease the registration of a swh-web admin endpoint

  • url_patterns – list of url patterns used by Django to identify the admin routes

  • view_name – the name of the Django view associated to the routes used to reverse the url