I'm not sure if this is a bug or intended, hence my asking here before adding to the bug database.
-- In django.contrib.auth.forms, the UserCreationForm and UserChangeForm refer several times to the User model directly, rather than using get_user_model().
This means that when using a different model for the user model, you can't use the Django admin unless you create a custom form that overrides this behavior.
When I change this in the Django codebase to refer to get_user_model(), it works just fine -- both with the standard Django User model and with a custom user model. So, it *appears* that this could work fine as a code fix for Django.
It's possible, though, that there's a subtlety I'm missing and that these should continue to refer to User proper.
Thoughts, anyone?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6e01619f-d9cb-403c-9cd1-0976b2cd5c47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment