File: urls.py

package info (click to toggle)
django-menu-generator-ng 1.2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 276 kB
  • sloc: python: 729; makefile: 17
file content (11 lines) | stat: -rwxr-xr-x 331 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
from django.urls import re_path

def testview(request):
    return 'foo'

urlpatterns = [
    re_path(r'named-url', lambda: 'foo', name='named_url'),
    re_path(r'named-with-params/(?P<pk>\d+)/', lambda: 'foo', name='named_with_params'),
    re_path(r'known-view', testview, name='known_view'),
    re_path(r'', lambda: 'foo'),
]