Skip to content

Commit

Permalink
Merge pull request #160 from mikeurbanski/master
Browse files Browse the repository at this point in the history
Added `user` and `inviter` to admin `raw_id_fields`
  • Loading branch information
paltman committed Feb 1, 2015
2 parents 80ecf72 + 71f79c7 commit 0220913
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions account/admin.py
Expand Up @@ -10,15 +10,27 @@ class SignupCodeAdmin(admin.ModelAdmin):
list_display = ["code", "max_uses", "use_count", "expiry", "created"]
search_fields = ["code", "email"]
list_filter = ["created"]
raw_id_fields = ["inviter"]


class EmailAddressAdmin(admin.ModelAdmin):
class AccountAdmin(admin.ModelAdmin):

raw_id_fields = ["user"]


class AccountDeletionAdmin(AccountAdmin):

list_display = ["email", "date_requested", "date_expunged"]


class EmailAddressAdmin(AccountAdmin):

list_display = ["user", "email", "verified", "primary"]
search_fields = ["email", "user__username"]
list_filter = ["user"]


admin.site.register(Account)
admin.site.register(Account, AccountAdmin)
admin.site.register(SignupCode, SignupCodeAdmin)
admin.site.register(AccountDeletion, list_display=["email", "date_requested", "date_expunged"])
admin.site.register(AccountDeletion, AccountDeletionAdmin)
admin.site.register(EmailAddress, EmailAddressAdmin)

0 comments on commit 0220913

Please sign in to comment.