Add Django-1.2.1
[frozenviper.git] / Django-1.2.1 / tests / regressiontests / urlpatterns_reverse / urls.py
blobc603c0235a15b2d553158a053ae5867dafdbf8fe
1 from django.conf.urls.defaults import *
2 from views import empty_view, absolute_kwargs_view
4 other_patterns = patterns('',
5 url(r'non_path_include/$', empty_view, name='non_path_include'),
8 urlpatterns = patterns('',
9 url(r'^places/(\d+)/$', empty_view, name='places'),
10 url(r'^places?/$', empty_view, name="places?"),
11 url(r'^places+/$', empty_view, name="places+"),
12 url(r'^places*/$', empty_view, name="places*"),
13 url(r'^(?:places/)?$', empty_view, name="places2?"),
14 url(r'^(?:places/)+$', empty_view, name="places2+"),
15 url(r'^(?:places/)*$', empty_view, name="places2*"),
16 url(r'^places/(\d+|[a-z_]+)/', empty_view, name="places3"),
17 url(r'^places/(?P<id>\d+)/$', empty_view, name="places4"),
18 url(r'^people/(?P<name>\w+)/$', empty_view, name="people"),
19 url(r'^people/(?:name/)', empty_view, name="people2"),
20 url(r'^people/(?:name/(\w+)/)?', empty_view, name="people2a"),
21 url(r'^optional/(?P<name>.*)/(?:.+/)?', empty_view, name="optional"),
22 url(r'^hardcoded/$', 'hardcoded/', empty_view, name="hardcoded"),
23 url(r'^hardcoded/doc\.pdf$', empty_view, name="hardcoded2"),
24 url(r'^people/(?P<state>\w\w)/(?P<name>\w+)/$', empty_view, name="people3"),
25 url(r'^people/(?P<state>\w\w)/(?P<name>\d)/$', empty_view, name="people4"),
26 url(r'^people/((?P<state>\w\w)/test)?/(\w+)/$', empty_view, name="people6"),
27 url(r'^character_set/[abcdef0-9]/$', empty_view, name="range"),
28 url(r'^character_set/[\w]/$', empty_view, name="range2"),
29 url(r'^price/\$(\d+)/$', empty_view, name="price"),
30 url(r'^price/[$](\d+)/$', empty_view, name="price2"),
31 url(r'^price/[\$](\d+)/$', empty_view, name="price3"),
32 url(r'^product/(?P<product>\w+)\+\(\$(?P<price>\d+(\.\d+)?)\)/$',
33 empty_view, name="product"),
34 url(r'^headlines/(?P<year>\d+)\.(?P<month>\d+)\.(?P<day>\d+)/$', empty_view,
35 name="headlines"),
36 url(r'^windows_path/(?P<drive_name>[A-Z]):\\(?P<path>.+)/$', empty_view,
37 name="windows"),
38 url(r'^special_chars/(.+)/$', empty_view, name="special"),
39 url(r'^(?P<name>.+)/\d+/$', empty_view, name="mixed"),
40 url(r'^repeats/a{1,2}/$', empty_view, name="repeats"),
41 url(r'^repeats/a{2,4}/$', empty_view, name="repeats2"),
42 url(r'^repeats/a{2}/$', empty_view, name="repeats3"),
43 url(r'^(?i)CaseInsensitive/(\w+)', empty_view, name="insensitive"),
44 url(r'^test/1/?', empty_view, name="test"),
45 url(r'^(?i)test/2/?$', empty_view, name="test2"),
46 url(r'^outer/(?P<outer>\d+)/',
47 include('regressiontests.urlpatterns_reverse.included_urls')),
48 url('', include('regressiontests.urlpatterns_reverse.extra_urls')),
50 # This is non-reversible, but we shouldn't blow up when parsing it.
51 url(r'^(?:foo|bar)(\w+)/$', empty_view, name="disjunction"),
53 # Regression views for #9038. See tests for more details
54 url(r'arg_view/$', 'kwargs_view'),
55 url(r'arg_view/(?P<arg1>\d+)/$', 'kwargs_view'),
56 url(r'absolute_arg_view/(?P<arg1>\d+)/$', absolute_kwargs_view),
57 url(r'absolute_arg_view/$', absolute_kwargs_view),
59 url('^includes/', include(other_patterns)),