2018-12-07 22:52:28 +00:00
|
|
|
|
from django.urls import include, path, re_path
|
2011-10-13 21:34:56 +00:00
|
|
|
|
|
2015-01-28 12:35:27 +00:00
|
|
|
|
from . import views
|
2007-02-13 04:24:58 +00:00
|
|
|
|
|
2015-06-25 16:49:50 +00:00
|
|
|
|
ns_patterns = [
|
2007-02-13 04:24:58 +00:00
|
|
|
|
# Test urls for testing reverse lookups
|
2018-12-07 22:52:28 +00:00
|
|
|
|
path('', views.index, name='index'),
|
|
|
|
|
re_path(r'^client/([0-9,]+)/$', views.client, name='client'),
|
|
|
|
|
re_path(r'^client/(?P<id>[0-9]+)/(?P<action>[^/]+)/$', views.client_action, name='client_action'),
|
|
|
|
|
re_path(r'^client/(?P<client_id>[0-9]+)/(?P<action>[^/]+)/$', views.client_action, name='client_action'),
|
|
|
|
|
re_path(r'^named-client/([0-9]+)/$', views.client2, name="named.client"),
|
2015-06-25 16:49:50 +00:00
|
|
|
|
]
|
|
|
|
|
|
2007-07-07 18:24:27 +00:00
|
|
|
|
|
2015-06-25 16:49:50 +00:00
|
|
|
|
urlpatterns = ns_patterns + [
|
2007-07-07 18:24:27 +00:00
|
|
|
|
# Unicode strings are permitted everywhere.
|
2018-12-07 22:52:28 +00:00
|
|
|
|
re_path(r'^Юникод/(\w+)/$', views.client2, name="метка_оператора"),
|
|
|
|
|
re_path(r'^Юникод/(?P<tag>\S+)/$', views.client2, name="метка_оператора_2"),
|
2015-06-25 16:49:50 +00:00
|
|
|
|
|
|
|
|
|
# Test urls for namespaces and current_app
|
2018-12-07 22:52:28 +00:00
|
|
|
|
path('ns1/', include((ns_patterns, 'app'), 'ns1')),
|
|
|
|
|
path('ns2/', include((ns_patterns, 'app'))),
|
2014-04-02 00:46:34 +00:00
|
|
|
|
]
|