#8325: User Authentication Tutorial has incorrect redirect_field_name value
----------------------------------------------------------+-----------------
          Reporter:  Robert Reeves <[email protected]>  |         Owner:  
nobody
            Status:  reopened                             |     Milestone:      
  
         Component:  Documentation                        |       Version:  SVN 
  
        Resolution:                                       |      Keywords:      
  
             Stage:  Accepted                             |     Has_patch:  0   
  
        Needs_docs:  0                                    |   Needs_tests:  0   
  
Needs_better_patch:  0                                    |  
----------------------------------------------------------+-----------------
Changes (by gabrielhurley):

  * stage:  Unreviewed => Accepted

Old description:

> http://www.djangoproject.com/documentation/authentication/
>
> It would be nice to update the text "redirect_field_name='redirect_to'"
> to "redirect_field_name='next'" in describing the login_required
> decorator. Using 'redirect_to' instead of 'next' causes the login user to
> be redirected to accounts/profile, which is confusing to a newbie like
> me.
>
> Thanks!
>
> Robert

New description:

 http://www.djangoproject.com/documentation/authentication/

 It would be nice to update the text "redirect_field_name='redirect_to'" to
 "redirect_field_name='next'" in describing the login_required decorator.
 Using 'redirect_to' instead of 'next' causes the login user to be
 redirected to accounts/profile, which is confusing to a newbie like me.

 Thanks!

 Robert

Comment:

 In response to the anonymous re-opener: you are misunderstanding the
 purpose here. Let me explain:

 The login view is designed to be as customizable as possible. When the
 default values are left alone, everything works as it should: the standard
 login template is used, and the template is passed a context variable
 called "next" with the value of `redirect_to`.

 When you start customizing things, `redirect_field_name` and `redirect_to`
 form the key and value (respectively) that get passed to the context. It's
 only useless if you forget to customize the template as well so that it
 knows to use your customized `redirect_field_name` instead of the default
 "next".

 However, after some of the recent changes to that doc, I will agree that
 it needs just a few minor tweaks to be clearer on these points. I will fix
 it presently.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8325#comment:6>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to