swh.web.browse.browseurls module

class swh.web.browse.browseurls.BrowseUrls[source]

Bases: swh.web.utils.urlsindex.UrlsIndex

Class to manage swh-web browse application urls.

scope = 'browse'
swh.web.browse.browseurls.browse_route(*url_patterns: str, view_name: Optional[str] = None, checksum_args: Optional[List[str]] = None)[source]

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

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

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