Ticket #5994: test-url-tag-fails-on-dots.patch
File test-url-tag-fails-on-dots.patch, 1.7 KB (added by , 17 years ago) |
---|
-
regressiontests/templates/tests.py
856 856 'url04' : ('{% url named.client client.id %}', {'client': {'id': 1}}, '/url_tag/named-client/1/'), 857 857 'url05' : (u'{% url метка_оператора v %}', {'v': u'Ω'}, 858 858 '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'), 859 'url06' : ('{% url dotted-url client.id1,client.id2 %}', {'client': {'id1': 1, 'id2': 2}}, '/url_tag/client/1.2/'), 859 860 860 861 # Failures 861 862 'url-fail01' : ('{% url %}', {}, template.TemplateSyntaxError), -
regressiontests/templates/urls.py
9 9 (r'^client/(\d+)/$', views.client), 10 10 (r'^client/(?P<id>\d+)/(?P<action>[^/]+)/$', views.client_action), 11 11 url(r'^named-client/(\d+)/$', views.client, name="named.client"), 12 13 # Url with a dot 14 url(r'^client/(?P<id1>\d+)\.(?P<id2>\d+)/$', views.dotted, name="dotted-url"), 12 15 13 16 # Unicode strings are permitted everywhere. 14 17 url(ur'^Юникод/(\w+)/$', views.client, name=u"метка_оператора"), -
regressiontests/templates/views.py
8 8 9 9 def client_action(request, id, action): 10 10 pass 11 12 def dotted(request, id1, id2): 13 pass