Ticket #12644: fix.diff

File fix.diff, 692 bytes (added by Karataev Pavel, 15 years ago)
  • contrib/auth/admin.py

     
    6262        Use special form during user creation
    6363        """
    6464        defaults = {}
    65         if not obj:
    66             defaults = {
    67                 'form': UserCreationForm,
    68                 'fields': ['username'],
    69             }
     65        if obj is None:
     66            defaults['form'] = self.add_form
     67            defaults['fields'] = admin.util.flatten_fieldsets(self.add_fieldsets)
    7068        defaults.update(kwargs)
    7169        return super(UserAdmin, self).get_form(request, obj, **defaults)
    7270
Back to Top