hi !
I have created a custom User Model in my app. But, now, in the administration panel, I can’t assign a user to a group or a permission because the right table doesn’t appear. I don’t find any solution yet, do you have any idea to solve this problem ?
Thanks !
screens :
Codes :
admin.py
class UserAdmin(admin.ModelAdmin):
list_display = ('username', 'email')
search_fields = ('username',)
fieldsets = (
(None, {
'classes': ['wide'],
'fields': ('username', 'password')
}),
('Informations personnelles', {
'classes': ['wide'],
'fields': ('first_name', 'last_name', 'email', 'avatar')
}),
('Permissions', {
'classes': ['wide'],
'fields': ('is_superuser', 'is_staff', 'is_active', 'groups', 'permissions')
}),
('Dates importantes', {
'classes': ['wide'],
'fields': ('last_login', 'date_joined')
}),
)
models.py :
class User(AbstractUser):
signup_token = models.UUIDField(primary_key=False, unique=True, verbose_name="jeton d'inscription", null=True, blank=True)
avatar = CloudinaryField('image', blank=True, null=True)