I want to modify the Permissions and Group models from django.contrib.auth. I have extended them but am unable to understand how to use these extended models in my project. I had researched about it again and again but could not find the solution. Can any one help me?
I had to add two extra fields in Permission model and 4 additional fields in Group model. I had extended both models but when I replace the permissions attribute of Group class it gives error that local fields cannot replace existing. Further, I cannot use add/contribute to original class methods as it is dangerous to replace original files and is not a good programming practice too. Is there any way to change permissions in Group model. Secondly, how can I use these new models in User model?
the error is quite clear. You cannot have a property on the class that is already implemented by the base class.
Do you need to inherit from the permissions class? Could you edit it instead?