Using the url tag
-
hard-coded (not DRY)
-
/route/first
(url 'route:first-view')
-
url 'route:second-view'
-
/gview/cats
(url 'gview:cats') from gview/urls.py
-
/gview/cat/42
(url 'gview:cat' 42) from gview/urls.py
-
/route/second
(url 'nsroute:second-view') from dj4e-samples/urls.py
Documentation