#20367: Custom User model, wrong field order in Django admin form -------------------------------+-------------------- Reporter: dyve | Owner: nobody Type: Bug | Status: new Component: contrib.admin | Version: 1.5 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------- Create a Custom user that just adds a few fields. Do this by inheriting django.contrib.auth.models.AbstractUser
Here is my code: {{{ class User(AbstractUser): is_admin = models.BooleanField(default=False, verbose_name=ugettext_lazy('is admin')) hide_name = models.BooleanField(default=False, verbose_name=ugettext_lazy('hide name')) country = models.ForeignKey(Country, null=True, blank=True, verbose_name=ugettext_lazy('country')) language = LanguageField(null=True, blank=True) share_photos = models.BooleanField(default=True, verbose_name=ugettext_lazy('share photo\'s with other users')) }}} when adding/editing a user in the Django admin, I would expect to see the standard User fields in the same order as when using django.contrib.auth.models.User, and my own (added) fields below them). Instead, the inherited fields are in an order tha makes no sense, starting with password. See screenshot. -- Ticket URL: <https://code.djangoproject.com/ticket/20367> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.