[Fixed]-Django model permissions not picked up on admin



manage.py syncdb --all

Otherwise, You can force django to generate permissions for a particular app:

from django.contrib.auth.management import create_permissions
from django.apps import apps


This will do all models in the app. You can substitute a list of model class objects instead of ‘get_models()’ if you only want a subset.



What you need to do is a syncdb each time you add/modify a permission for a model.

 python manage.py syncdb


python manage.py migrate --fake

Leave a comment