#30139: django.contrib.auth.forms.UserCreationForm() doesn't call default
manager's
create_user()
-------------------------------------+-------------------------------------
Reporter: Ashish Mohite | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 2.1
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => invalid
Comment:
Hi.
This is more of a question than a bug report. It might have been better
targeted (at least initially) at the django-users or similar.
However...
I don't think there's much we can do here. The long and short is, that's
just how model forms work: they instantiate an instance of the model,
update attributes on that, and call `save()`, rather than using manager
`create()` style helpers. (That's not something that's realistically going
to change I think.)
You **could**, in your own project override the default admin and provide
an `add_form` that used your `create_user` and so on. (No doubt there'd be
wiggles.)
That's beyond the scope of help we can provide here I'm afraid.
Good luck. Have fun.
--
Ticket URL: <https://code.djangoproject.com/ticket/30139#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.b3c82afbe102ff17bf18028490f866ae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.