Skip to content
This repository was archived by the owner on Oct 19, 2022. It is now read-only.

Add optional support for post-login redirect#2

Open
neil-s wants to merge 13 commits intomatagus:masterfrom
neil-s:master
Open

Add optional support for post-login redirect#2
neil-s wants to merge 13 commits intomatagus:masterfrom
neil-s:master

Conversation

@neil-s
Copy link
Copy Markdown

@neil-s neil-s commented Feb 14, 2013

The changes in this pull request enable developers to set the path the module will redirect to, instead of defaulting to /admin/. The redirect path is determined in the following order.

  1. A 'next' GET parameter on the link to do_login.
  2. The 'LASTFM_AUTH_REDIRECT' setting in the app's settings.
  3. Default value of '/admin/'.

I've set the default value for backwards compatibility, so existing projects will not break when they update to this without changing their code, and will continue to function normally.

Neil added 5 commits February 13, 2013 16:45
Sending next parameter to login ensures you end up at the same page
after logging in.
The auth module takes 'next' as an optional parameter. If this is not
passed, it checks if the settings specify a 'LASTFM_AUTH_REDIRECT' to
redirect to. If not, it redirects to '/admin/'
Ignore Finder, pyc and egg-info files
@matagus
Copy link
Copy Markdown
Owner

matagus commented Feb 17, 2013

@neil-s really cool and well done! Can you please remove commits aa84ae7 and fd8f213 from the pull request?

@neil-s
Copy link
Copy Markdown
Author

neil-s commented Feb 18, 2013

Whoops, didn't realise new commits would be added automatically to the pull request. Doesn't seem to be any straightforward way to remove commits from the pull request, what do you suggest? Should I undo the changes on my own repo by reverting changes and then squashing all those commits? Or is there a way to just exclude them from the pull request?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants