Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#10864 closed (fixed)

Clarify that "next" is the default for redirect_to_field

Reported by: trigeek38 Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: next, login_decorator
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Section described: http://docs.djangoproject.com/en/dev/topics/auth/#the-login-required-decorator.

The use of the 'next' and 'redirect_to_field' is not clear. I think this section deserves a little more description of how to use the decorator correctly.

Current:
"If the user isn't logged in, redirect to settings.LOGIN_URL (/accounts/login/ by default), passing the current absolute URL in the query string as next or the value of redirect_field_name. For example: /accounts/login/?next=/polls/3/."

Addition:
"You can pass this value to the login form to complete the request after successful login. See views.login() below for an example.

Attachments (1)

10864.diff (773 bytes) - added by SmileyChris 6 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by mtredinnick

  • milestone 1.1 deleted
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by SmileyChris

  • Has patch set
  • Summary changed from Helpful addition for use of @login_required. to Clarify that "next" is the default for redirect_to_field
  • Triage Stage changed from Unreviewed to Ready for checkin
  • Version changed from 1.0 to SVN

Changed 6 years ago by SmileyChris

comment:3 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [11544]) Fixed #10864 -- Clarified the role played by redirect_to_field in the login_required auth decorator. Thanks to trigeek38 for the suggestion, and SmileyChris for the draft.

comment:4 Changed 5 years ago by russellm

(In [11566]) [1.1.X] Fixed #10864 -- Clarified the role played by redirect_to_field in the login_required auth decorator. Thanks to trigeek38 for the suggestion, and SmileyChris for the draft.

Merge of r11544 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top