You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wesley B edited this page May 30, 2025
·
1 revision
Some tasks require a developer to have a user with staff-level permissions.
Use Cases
To be able to work in the CMS admin interface to change user-facing content.
Steps
Login to docker shell:
docker exec -it des_django /bin/bash
Enter python shell:
python manage.py shell
Find & Update your user:
from django.contrib.auth import get_user_model
my_user = get_user_model().objects.get(username="my_username")
# Set your local user to be "staff" or "superuser"
my_user.is_staff = True
my_user.is_superuser = True
my_user.save()