I have built a Django site for a while, but I never enabled Django admin.
User accounts are registered on both LDAP and Django, but the master record is based on LDAP. So I must use the account in LDAP as super user.
When I enable Django Admin, I am prompted to create a super user. Can I use an existing account (registered on both LDAP and Django db) as super user?
How?
Yes, but you’ll do it through the Django shell:
Then fetch your user from the database:
Exit the shell, and that user will now be an admin user.
You can also add the line
before calling
user.save()if you want or need this user to be a superuser and have all the available permissions.