Opened 13 years ago

Closed 12 years ago

#16197 closed Cleanup/optimization (duplicate)

Rewrite contrib auth to use class based views

Reported by: Harro Owned by: Harro
Component: contrib.auth Version: dev
Severity: Normal Keywords: dceu2011
Cc: hvdklauw@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Having classed based views for the auth app would make reusing them from your own site with small modifications a lot easier.

Change History (11)

comment:1 by Harro, 13 years ago

Working on this during djangocon eu 2011 sprints

comment:2 by Harro, 13 years ago

Triage Stage: UnreviewedDesign decision needed

Right, so I started this, converted login and logout to class based views, changed the current view functions to simply call the class based view and give a PendingDeprecationWarning. Ran the tests, everything is fine.
Changed the urls.py in auth to use the Class Based views: Two errors: Tests (and possibly other code) uses the view function dotpath to reverse them, there is no name defined.

How should I solve this?

comment:3 by Harro, 13 years ago

Using the old view dotpath as name also doesn't fix the problem, as view lookups are resolved before names and the original view functions still exist.

comment:4 by Harro, 13 years ago

Keywords: dceu2011 added

comment:5 by Harro, 13 years ago

Triage Stage: Design decision neededAccepted

After talking with Russel and Alex we decided there was no nice way to do this, except in the same way the admin urls handling was changed before.

Alex has some idea's for a Class Based View Collection which basically is a class with class based views that handles the urls.

We'll look into it some more

comment:6 by Harro, 13 years ago

Depends on #16213 to be finished first for a nice solution

comment:7 by Harro, 13 years ago

Cc: Harro added

comment:8 by Harro, 13 years ago

Cc: Harro removed

comment:9 by Harro, 13 years ago

Cc: hvdklauw@… added

comment:10 by Jacob, 12 years ago

milestone: 1.4

Milestone 1.4 deleted

comment:11 by anonymous, 12 years ago

Resolution: duplicate
Status: newclosed

Closing as duplicate of #17209 since it has recent activity and more comments and code.

Note: See TracTickets for help on using tickets.
Back to Top