Django

Code

Changeset 5401

Show
Ignore:
Timestamp:
06/01/07 04:35:29 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4409 -- Fixed a typo in tutorial (thanks, mitch.hunt.007@gmail.com
). Also updated the reverse() documentation to reflect that it can take
function references or strings for function names.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/tutorial04.txt

    r5368 r5401  
    6868            # with POST data. This prevents data from being posted twice if a 
    6969            # user hits the Back button. 
    70             return HttpResponseRedirect(reverse('results', args=(p.id,))) 
     70            return HttpResponseRedirect(reverse('mysite.polls.views.results', args=(p.id,))) 
    7171 
    7272This code includes a few things we haven't covered yet in this tutorial: 
     
    105105 
    106106      ... where the ``3`` is the value of ``p.id``. This redirected URL will 
    107       then call the ``'results'`` view to display the final page. 
     107      then call the ``'results'`` view to display the final page. Note that 
     108      you need to use the full name of the view here (including the prefix). 
    108109 
    109110      For more information about ``reverse()``, see the `URL dispatcher`_ 
  • django/trunk/docs/url_dispatch.txt

    r5369 r5401  
    565565    reverse(viewname, urlconf=None, args=None, kwargs=None) 
    566566 
    567 The view name is either the function name or the `URL pattern name`_. 
    568 Normally you will not need to worry about the ``urlconf`` parameter and will 
    569 only pass in the positional and keyword arguments to use in the url matching. 
    570 For example:: 
     567The view name is either the function name (either a function reference, or the 
     568string version of the name, if you used that form in ``urlpatterns``) or the 
     569`URL pattern name`_.  Normally you will not need to worry about the 
     570``urlconf`` parameter and will only pass in the positional and keyword 
     571arguments to use in the url matching.  For example:: 
    571572 
    572573    from django.core.urlresolvers import reverse