15👍
try:
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
create_permissions(apps.get_app_config('my_app_name'))
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.
3👍
What you need to do is a syncdb each time you add/modify a permission for a model.
python manage.py syncdb
- Python: How can I override one module in a package with a modified version that lives outside the package?
- Stale content types while syncdb in Django
- Django custom manager with ManyToManyField
Source:stackexchange.com