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 , 13 years ago
comment:2 by , 13 years ago
Triage Stage: | Unreviewed → Design 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 , 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 , 13 years ago
Keywords: | dceu2011 added |
---|
comment:5 by , 13 years ago
Triage Stage: | Design decision needed → Accepted |
---|
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:7 by , 13 years ago
Cc: | added |
---|
comment:8 by , 13 years ago
Cc: | removed |
---|
comment:9 by , 13 years ago
Cc: | added |
---|
comment:11 by , 12 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Closing as duplicate of #17209 since it has recent activity and more comments and code.
Working on this during djangocon eu 2011 sprints