Opened 20 years ago
Closed 18 years ago
#1306 closed defect (fixed)
[patch] Auth Manager class is using Manager.klass, should use Manager.model now
| Reported by: | jpaulofarias at gmail dot com | Owned by: | Adrian Holovaty |
|---|---|---|---|
| Component: | Tools | Version: | magic-removal |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Design decision needed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Patch inlined bellow:
Index: django/contrib/auth/models.py
===================================================================
--- django/contrib/auth/models.py (revision 2214)
+++ django/contrib/auth/models.py (working copy)
@@ -39,7 +39,7 @@
def create_user(self, username, email, password):
"Creates and saves a User with the given username, e-mail and password."
now = datetime.datetime.now()
- user = self.klass(None, username, '', '', email.strip().lower(), 'placeholder', False, True, False, now, now)
+ user = self.model(None, username, '', '', email.strip().lower(), 'placeholder', False, True, False, now, now)
user.set_password(password)
user.save()
return user
Note:
See TracTickets
for help on using tickets.
This appears to be fixed in current trunk.