Skip to content

Commit

Permalink
Change fields to exclude on UserChangeForm
Browse files Browse the repository at this point in the history
* The `User` model may have an arbitrary combination of fields based on
  the mixins used, and any extra fields added by the project.
  • Loading branch information
LilyFoote committed Mar 6, 2015
1 parent 33a5b3c commit 30583d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v7.0.1 (Upcoming)

* Fix `UserChangeForm` admin form to use `exclude` instead of `fields`.

## v7.0.0

* Add `delete` to `ProfileDetail` view
Expand Down
14 changes: 1 addition & 13 deletions user_management/models/admin_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,7 @@ class UserChangeForm(forms.ModelForm):
password = ReadOnlyPasswordHashField()

class Meta:
fields = (
'avatar',
'email',
'email_verification_required',
'groups',
'is_active',
'is_staff',
'is_superuser',
'last_login',
'name',
'password',
'user_permissions',
)
exclude = ()
model = User

def clean_password(self):
Expand Down

0 comments on commit 30583d6

Please sign in to comment.