Opened 6 years ago

Last modified 4 months ago

#12405 assigned New feature

django.contrib.auth.views.logout() should support LOGOUT_REDIRECT_URL

Reported by: cmwslw Owned by: cbarcenas
Component: contrib.auth Version: 1.1
Severity: Normal Keywords: logout LOGOUT_REDIRECT_URL
Cc: mike@… Triage Stage: Accepted
Has patch: no Needs documentation: yes
Needs tests: yes 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 (15)

comment:1 in reply to: ↑ description Changed 5 years ago by dloewenherz

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to dloewenherz
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by dloewenherz

  • Needs documentation set
  • Needs tests set

comment:3 Changed 5 years ago by cmwslw

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.

comment:4 Changed 5 years ago by dloewenherz

I'm claiming it, although I wouldn't exactly call it a bug ;).

Did you already have a patch?

comment:5 Changed 5 years ago by cmwslw

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:6 Changed 5 years ago by anonymous

Please see ticket #11223.

comment:7 Changed 4 years ago by mattmcc

  • Severity set to Normal
  • Type set to New feature

comment:8 Changed 4 years ago by carbonXT

  • Cc mike@… added

comment:9 Changed 3 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:10 Changed 3 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:11 Changed 22 months ago by bigkevmcd

  • Owner changed from dloewenherz to bigkevmcd

comment:12 Changed 14 months ago by anonymous

So? What's the status?

comment:13 Changed 14 months ago by anonymous

  • Owner bigkevmcd deleted
  • Status changed from assigned to new

comment:14 Changed 4 months ago by cbarcenas

  • Owner set to cbarcenas
  • Status changed from new to assigned

comment:15 Changed 4 months ago by cbarcenas

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.

https://github.com/cbarcenas/django/tree/ticket_12405

Last edited 4 months ago by cbarcenas (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top