Added admin fields to user

This commit is contained in:
Zak Timson 2017-08-18 22:28:23 -04:00
parent 1b8c461cc1
commit f4dcb187ae

View File

@ -14,8 +14,16 @@ class SubscriberInline(admin.StackedInline):
class ExtendUserAdmin(admin.ModelAdmin):
list_display = ['username', 'first_name', 'last_name', 'email', 'date_joined', 'newsletter', 'is_staff', 'is_superuser']
search_fields = ['username', 'first_name', 'last_name', 'email']
list_filter = ['is_staff', 'is_superuser']
inlines = [SubscriberInline]
def newsletter(self, obj):
print(vars(obj))
return bool(True)
newsletter.boolean = True
admin.site.unregister(User)
admin.site.register(User, ExtendUserAdmin)