Ticket #4103: url_dispatch2.diff
File url_dispatch2.diff, 733 bytes (added by , 18 years ago) |
---|
-
docs/url_dispatch.txt
540 540 The string used for the URL name can contain any characters you like. You are 541 541 not restricted to valid Python names. 542 542 543 Also, ``django.core.urlresolvers`` has a function ``reverse`` which allows you to 544 do the same thing outside templates, such as redirecting inside a view:: 545 546 from django.core.urlresolvers import reverse 547 548 def myview(request): 549 return HttpResponseRedirect(reverse('arch-summary', args=[1945])) 550 543 551 .. note:: 544 552 545 553 When you name your URL patterns, make sure you use names that are unlikely