mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
In urlconfs, include() may now be used on an iterable of patterns instead of just a module string. Refs #6470 -- making the admin use a urlconf is much easier with this work done. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
from django.conf.urls.defaults import *
|
||||
from views import empty_view, absolute_kwargs_view
|
||||
|
||||
other_patterns = patterns('',
|
||||
url(r'non_path_include/$', empty_view, name='non_path_include'),
|
||||
)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^places/(\d+)/$', empty_view, name='places'),
|
||||
url(r'^places?/$', empty_view, name="places?"),
|
||||
@@ -51,5 +55,9 @@ urlpatterns = patterns('',
|
||||
url(r'arg_view/(?P<arg1>\d+)/$', 'kwargs_view'),
|
||||
url(r'absolute_arg_view/(?P<arg1>\d+)/$', absolute_kwargs_view),
|
||||
url(r'absolute_arg_view/$', absolute_kwargs_view),
|
||||
|
||||
url('^includes/', include(other_patterns)),
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user