Django model permissions not picked up on admin
django, django-admin, django-permissions
Solution
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.
Problem
I've added permission to my model and I would like to create a group in admin that uses this permission. The problem is that the new permission is not listed in the permissions list. is there something I need to do to add it to that list? ``` class Meta: permissions = ( ("add_remove_job", "Can add/remove jobs"), ) ``` SOLUTION: It is a known limitation of South, the solution is to do syncdb --all