Ticket #4103: url_dispatch.diff
File url_dispatch.diff, 1.6 KB (added by , 18 years ago) |
---|
-
tests/runtests.py
141 141 usage = "%prog [options] [model model model ...]" 142 142 parser = OptionParser(usage=usage) 143 143 parser.add_option('-v','--verbosity', action='store', dest='verbosity', default='0', 144 type='choice', choices=['0', '1', '2' ],145 help='Verbosity level; 0=minimal output, 1=normal output, 2=all output ')144 type='choice', choices=['0', '1', '2', '3'], 145 help='Verbosity level; 0=minimal output, 1=normal output, 2=all output, 3=all output and test information') 146 146 parser.add_option('--settings', 147 147 help='Python path to settings module, e.g. "myproject.settings". If this isn\'t provided, the DJANGO_SETTINGS_MODULE environment variable will be used.') 148 148 options, args = parser.parse_args() -
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