PageRenderTime 18ms CodeModel.GetById 10ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/regressiontests/urlpatterns_reverse/included_namespace_urls.py

https://code.google.com/p/mango-py/
Python | 20 lines | 14 code | 6 blank | 0 comment | 0 complexity | 566a78e1d6e1b73238e702067a057d0f MD5 | raw file
 1from django.conf.urls.defaults import *
 2from namespace_urls import URLObject
 3from views import view_class_instance
 4
 5testobj3 = URLObject('testapp', 'test-ns3')
 6
 7urlpatterns = patterns('regressiontests.urlpatterns_reverse.views',
 8    url(r'^normal/$', 'empty_view', name='inc-normal-view'),
 9    url(r'^normal/(?P<arg1>\d+)/(?P<arg2>\d+)/$', 'empty_view', name='inc-normal-view'),
10
11    url(r'^mixed_args/(\d+)/(?P<arg2>\d+)/$', 'empty_view', name='inc-mixed-args'),
12    url(r'^no_kwargs/(\d+)/(\d+)/$', 'empty_view', name='inc-no-kwargs'),
13
14    url(r'^view_class/(?P<arg1>\d+)/(?P<arg2>\d+)/$', view_class_instance, name='inc-view-class'),
15
16    (r'^test3/', include(testobj3.urls)),
17    (r'^ns-included3/', include('regressiontests.urlpatterns_reverse.included_urls', namespace='inc-ns3')),
18    (r'^ns-included4/', include('regressiontests.urlpatterns_reverse.namespace_urls', namespace='inc-ns4')),
19)
20