How to view/update the Django admin console.
Step-by-step guide
To create a superuser for the lms application in Django:
- You'll do this by using the interactive python shell and modifying your user account. First, create a new account in your local lms instance for your username at http://localhost:8000/register
It is important to create the account using the registration page as opposed to the manage.py command line interface, as in addition to creating a user instance, it will create a profile instance, which some portions of the UI/backend require.
Next, we'll need to drop down to an interactive python shell and issue some commands to modify the user. First,First, let's log in to your vagrant instance:
Code Block $ vagrant ssh
Switch to the edxapp user:
Code Block $ sudo su edxapp
Start the interactive shell:Create your user
Code Block $ ./manage.py lms manage_user --settings aws shell
Once in the Shell, execute the following code, replacing your-user with your new user account, created above:
Code Block language py from django.contrib.auth.models import User me = User.objects.get(username="your-user") me.is_superuser = True me.is_staff = True me.is_active = True # Alternatively, you could follow the activation link in the console output (what would have been sent by email if this wasn't a dev instance) me.save() exit()help $ ./manage.py lms manage_user username username@example.com --superuser
- Confirm that you have access to the admin portal by logging in with your new account to LMS Admin
...
Page Properties | |||
---|---|---|---|
| |||
|