how to disable password after inheriting AbstractUser to make a custom user

gdubs :

I followed what django docs said about inheriting AbstractUser to make a custom user for easy future changes

https://docs.djangoproject.com/en/3.0/topics/auth/customizing/#using-a-custom-user-model-when-starting-a-project

Anyway, I have it now on the admin menu as a different page, it now looks like this enter image description here

I basically want to disable that input (and others as well). How do I do that?

Arakkal Abu :

I think you are searching for the readonly_fields and exclude attributes of ModelAdmin,

class MyModelAdmin(admin.ModelAdmin):
    readonly_fields = ('foo', 'bar')
    exclude = ('foo_bar',)

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=390897&siteId=1