Opened 8 years ago

Closed 6 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: master
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


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 Changed 8 years ago by Harro

Working on this during djangocon eu 2011 sprints

comment:2 Changed 8 years ago by Harro

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 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 Changed 8 years ago by Harro

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 Changed 8 years ago by Harro

Keywords: dceu2011 added

comment:5 Changed 8 years ago by Harro

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 Changed 8 years ago by Harro

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

comment:7 Changed 8 years ago by Harro

Cc: Harro added

comment:8 Changed 8 years ago by Harro

Cc: Harro removed

comment:9 Changed 8 years ago by Harro

Cc: hvdklauw@… added

comment:10 Changed 7 years ago by Jacob

milestone: 1.4

Milestone 1.4 deleted

comment:11 Changed 6 years ago by anonymous

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