I have a model that looks like this:
class Device(models.Model):
user = models.ForeignKey(User, related_name='device', db_index=True, null=True, blank=True)
If I do this in the admin, it removes the "change password" form from the admin site:
class UserAdmin(admin.ModelAdmin):
inlines = [DeviceInline]
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
Why? The DeviceInline is just a regular inline.
You need your class to sub-class from UserAdmin so replace with this
from django.contrib.auth.admin import UserAdmin
class MyUserAdmin(UserAdmin):
inlines = [DeviceInline]
admin.site.unregister(User)
admin.site.register(User, MyUserAdmin)