2014-04-02 00:46:34 +00:00
|
|
|
import warnings
|
|
|
|
|
2015-01-28 12:35:27 +00:00
|
|
|
from django.conf.urls import include, patterns, url
|
2014-11-26 21:21:29 +00:00
|
|
|
from django.utils.deprecation import RemovedInDjango20Warning
|
2011-10-13 21:34:56 +00:00
|
|
|
|
|
|
|
from .namespace_urls import URLObject
|
|
|
|
from .views import view_class_instance
|
|
|
|
|
2009-07-16 16:16:13 +00:00
|
|
|
testobj3 = URLObject('testapp', 'test-ns3')
|
|
|
|
|
2014-04-02 00:46:34 +00:00
|
|
|
# test deprecated patterns() function. convert to list of urls() in Django 2.0
|
2014-11-26 21:21:29 +00:00
|
|
|
with warnings.catch_warnings():
|
|
|
|
warnings.filterwarnings('ignore', category=RemovedInDjango20Warning)
|
2014-04-02 00:46:34 +00:00
|
|
|
|
|
|
|
urlpatterns = patterns('urlpatterns_reverse.views',
|
|
|
|
url(r'^normal/$', 'empty_view', name='inc-normal-view'),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^normal/(?P<arg1>[0-9]+)/(?P<arg2>[0-9]+)/$', 'empty_view', name='inc-normal-view'),
|
2009-07-16 16:16:13 +00:00
|
|
|
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^\+\\\$\*/$', 'empty_view', name='inc-special-view'),
|
2011-11-07 01:09:13 +00:00
|
|
|
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^mixed_args/([0-9]+)/(?P<arg2>[0-9]+)/$', 'empty_view', name='inc-mixed-args'),
|
|
|
|
url(r'^no_kwargs/([0-9]+)/([0-9]+)/$', 'empty_view', name='inc-no-kwargs'),
|
2010-08-05 07:09:47 +00:00
|
|
|
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^view_class/(?P<arg1>[0-9]+)/(?P<arg2>[0-9]+)/$', view_class_instance, name='inc-view-class'),
|
2010-08-06 13:47:56 +00:00
|
|
|
|
2014-04-02 00:46:34 +00:00
|
|
|
(r'^test3/', include(testobj3.urls)),
|
|
|
|
(r'^ns-included3/', include('urlpatterns_reverse.included_urls', namespace='inc-ns3')),
|
|
|
|
(r'^ns-included4/', include('urlpatterns_reverse.namespace_urls', namespace='inc-ns4')),
|
|
|
|
)
|