I'm trying to register a custom User Admin with a memberprofile inline. Based on SO answers and google my admin.py looks like:
class MemberProfileInline(admin.StackedInline):
model = MemberProfile
fk_name = 'user'
class FSUserAdmin(UserAdmin):
list_display = ('id', 'username',)
inlines = [MemberProfileInline,]
admin.site.unregister(User)
admin.site.register(User, FSUserAdmin)
When I load up the admin, none of the changes defined in FSUserAdmin take place.
If I comment out
admin.site.register(User, FSUserAdmin)
I get the error that the user site is not registered, so i know it is getting unregistered successfully.
Does anyone have any insight into what I'm missing?
update:
django.contrib.auth and django.contrib.admin appear before any project specific apps in the INSTALLED_APPS list in settings.py
I've got the following in my project urls.py
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()