Opened 15 years ago
Closed 9 years ago
#12405 closed New feature (fixed)
django.contrib.auth.views.logout() should support LOGOUT_REDIRECT_URL
Reported by: | Cory Walker | Owned by: | Hugo Osvaldo Barrera |
---|---|---|---|
Component: | contrib.auth | Version: | 1.1 |
Severity: | Normal | Keywords: | logout LOGOUT_REDIRECT_URL |
Cc: | mike@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I was wondering why django.contrib.auth.views.logout() doesn't support a REDIRECT_URL override in the settings file as login() does. I'm aware that it is possible to specify a next_page argument, however, this is cumbersome if the urls.py containing logout() is a third party library such as django-registration. I haven't taken a good look at the source, but I am guessing this would be a simple patch to write in order to support LOGOUT_REDIRECT_URL. Before I work on it, I need to know if there are any possible regressions or if there are any opinions against this.
Change History (19)
comment:1 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 15 years ago
Needs documentation: | set |
---|---|
Needs tests: | set |
comment:3 by , 15 years ago
comment:4 by , 15 years ago
I'm claiming it, although I wouldn't exactly call it a bug ;).
Did you already have a patch?
comment:5 by , 15 years ago
I don't have a patch, I was just making sure you were claiming it. If you end up not being able to work on it, I could if I have time.
comment:7 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:8 by , 14 years ago
Cc: | added |
---|
comment:11 by , 11 years ago
Owner: | changed from | to
---|
comment:13 by , 10 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:14 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:15 by , 10 years ago
Picking this one up as my first contribution to Django :) I don't anticipate this taking more than a few lines of code and a test or two.
comment:16 by , 9 years ago
I've implemented a PR for this, based on changes that implemented this on a specific project:
Let me know if there's anything that need tweaking.
comment:17 by , 9 years ago
Has patch: | set |
---|---|
Needs documentation: | unset |
Tests are missing. Please uncheck "Needs tests" on the ticket when you update it so the ticket appears in the review queue, thanks!
comment:18 by , 9 years ago
Needs tests: | unset |
---|---|
Owner: | changed from | to
dloewenherz: are you a triager giving me the go-ahead for writing a patch like this, or are you claiming the bug yourself? Either way, I'm still interested in seeing this patch hopefully make it into trunk.