I am trying to implement custom user model in my django application.
If I just copy and paste the code from this article, it works great. But I wish this custom user model to have permissions and groups. So I added this inheritance to models.py:
class MyUser(AbstractBaseUser, PermissionsMixin):
and these fields into the admin.py MyUserAdmin(UserAdmin) class:
('Permissions', {'fields': (
'is_admin', 'is_staff', 'is_active', 'groups', 'user_permissions',
)}),
But it looks strange for me:
As I know, it must be two containers: left (that I have) that shows all available groups and permissions and right (that I don't have) that shows all current user's groups and permissions.
P.S. I tried google for it and found only one post on reddit which is 10 month old but doesn't have a solution.
Deleting this line in MyUserAdmin class fixed the problem up.
filter_horizontal = ()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With