django-role-permissions icon indicating copy to clipboard operation
django-role-permissions copied to clipboard

sync_roles command not found error when tried to sync the roles using command "django-admin sync_roles"

Open grv1793 opened this issue 6 years ago • 3 comments

grv1793 avatar Mar 22 '19 09:03 grv1793

Hi @grv1793 can you provide some more information? What versions are you using? What error message did you see?

filipeximenes avatar Mar 22 '19 12:03 filipeximenes

When using "python manage.py sync_roles" it works. But when using django-admin, i get this error

Django version: (ironman) apples-Air:ironman apple$ django-admin version 1.11.20

Shell output: (ironman) apples-Air:ironman apple$ django-admin sync_roles No Django settings specified. Unknown command: 'sync_roles' Type 'django-admin help' for usage.

grv1793 avatar Mar 24 '19 10:03 grv1793

Same issue here, ./manage.py sync_roles works but django-admin sync_roles does not as it fails to import the project settings, I've tried the few tricks from the Django docs but no luck. I never use django-admin so not sure where is the problem.

Maybe update to manage.py method or add note to your docs? https://django-role-permissions.readthedocs.io/en/stable/admin.html#management-commands

eeintech avatar Sep 30 '20 18:09 eeintech