django admin - You don't have permission to edit anything

2015-11-05 Thread Benjamin Smith
I followed the django doc on creating a custom user model while extending the model itself with my own fields. So it became like this: class MyUser(AbstractBaseUser, PermissionsMixin): email = models.EmailF

Re: django admin - You don't have permission to edit anything

2015-11-05 Thread Andreas Kuhne
Hi, You don't have permissions to edit anything, because you haven't created a superuser. The superuser in django has a property that is called "is_superuser" and should be set to True. If you don't have that property (and your createsuperuser sets some other property), you will have the same rig

Re: django admin - You don't have permission to edit anything

2015-11-06 Thread Benjamin Smith
Hello, Yes I thought so too, but in the example there is no *is_superuser *property provided neither in the User models or in the User manager. Therefore, I just copied the example from the django doc and tried running it. After creating the superuser, I can edit the models. I have no Idea what I a

Re: django admin - You don't have permission to edit anything

2015-11-06 Thread Andreas Kuhne
Hi, Check the PermissionsMixin. In that mixin you add the is_superuser field. It also adds the relations to the auth group for group permissions and so on. And the django admin site checks for permissions by calling the has_perm() method on your user model. The has_perm() method always returns Tru

Re: django admin - You don't have permission to edit anything

2015-11-06 Thread Benjamin Smith
Yes, that was it. I changed the user manager function to create superuser into this def create_superuser(self, email, first_name, last_name, username, date_of_birth, password, **kwargs): user = self.create_user( email, first_name=first_name, last_name=la