Skip to content
Advertisement

Django migrations error: dont create authomatically permissions and contenttypes

I work with django 1.8.7 and python 2.7 . I have peoblem with migrate. when I migrate my models , permission and contenttypes don’t create automatically. error looks like this:

JavaScript

and when I change migrations file like this:

JavaScript

and run command ” python manage.py migrate ” this is responsed:

JavaScript

thanks for your help. :)

Advertisement

Answer

I find the solution, in other model.py apps when define custom permissions , my colleagues define custom permissions like this:

JavaScript

although, type of permission should be tupe; this means permission should be define like this:

JavaScript

this “,” is so important!!! :))

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement