Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

162
Views
Django edit UserAdmin removes change password form from Admin Site

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.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!