Ticket #12644: fix.diff
File fix.diff, 692 bytes (added by , 15 years ago) |
---|
-
contrib/auth/admin.py
62 62 Use special form during user creation 63 63 """ 64 64 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) 70 68 defaults.update(kwargs) 71 69 return super(UserAdmin, self).get_form(request, obj, **defaults) 72 70