#17209: Dogfood class-based views in contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  melinath             |                    Owner:  andrews
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  master
    Component:  contrib.auth         |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  class-based views    |      Needs documentation:  0
  admin auth                         |  Patch needs improvement:  0
    Has patch:  0                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by bmispelon):

 After two minor modifications, I've got all the tests passing on my fork.

 There are still a few things I'd like to improve, mostly around the
 redirection logic in LoginView and LogoutView (it's still messy).

 I've had a hard time wrapping my head around the flow of the function-
 based logout view. I'd appreciate it if someone could make sure I did
 actually replicate it.

 I also have a few questions:

 * LogoutView: For now, it inherits from TemplateView. Does it make more
 sense to inherit from RedirectView (RedirectView has the nice advantage of
 dispatching POST, OPTIONS, DELETE, and PUT to GET)? Or maybe simply View?

 * PasswordResetConfirmView: as mentionned in the comment on the code,
 there is a potential backwards-compatibility issue. It should not be too
 hard to correct it but is it really a problem?

 * Backwards-compatible stubs: the approach I took to ensure backwards-
 compatibility was to create function based wrappers around the class-based
 views. Is this a good approach?

 * How do I approach writing tests for these new class-based views? I'm
 having a hard time determining what should be tested and how.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17209#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to