Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4241546
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:19:19+00:00 2026-05-21T03:19:19+00:00

in Pinax, if I have a link that required login (i.e., I use the

  • 0

in Pinax, if I have a link that required login (i.e., I use the @login_required decorator), how do I redirect to that link after logging in, instead of being redirected to “what’s next”???

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:19:20+00:00Added an answer on May 21, 2026 at 3:19 am

    Simply set the LOGIN_REDIRECT_URL setting.

    EDIT
    It seems Pinax also supports another setting, LOGIN_REDIRECT_URLNAME, which seems to do the same thing as LOGIN_REDIRECT_URL, but is set to the url name, presumably so you don’t have to make a call to reverse in your settings.py file.

    For more ‘dynamic’ redirects, the pinax.apps.account.views.login view uses pinax.apps.account.utils.get_default_redirect to look for a redirect URL from the following:

    1. A GET or POST parameter named ‘next’ (by default, though it is possible to customize).
    2. The LOGIN_REDIRECT_URL setting
    3. The LOGIN_REDIRECT_URLNAME setting

    The code in get_default_redirect actually is checking in the session for a ‘redirect_to’ key, which presumably holds one of the values defined in the settings, as the method makes no attempt to look at django.conf.session on it’s own. The docstring claims that it checks for those settings, however, and that seems to be what you are experiencing in your project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen some code in Pinax and other django apps that instead of
I use Pinax, and I am trying to perform login test on account project,
So, I have a huge query that I need to run on an Access
I want to install pinax on windows , I have to install PIL but
I'm building a site for the local cub scouts using Pinax. Does anyone have
I recently discovered Pinax that appear to be an django stack with added most-used
One issue that comes up during Pinax development is dealing with development versions of
I have included a new app django_colorbox in my Pinax project. For some reason
I have a div element that I'm trying, basically, to move wherever the user
I understand that one can use pip to install packages from svn etc. ala:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.