Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to view/update the Django admin console.

Step-by-step guide

To create a superuser for the lms application in Django:

...

Note that these instructions are for use with devstack. If you are using a full-stack environment, some variations are required; for edX sandboxes, see the instructions on Managing Open edX Tips and Tricks.

Step-by-step guide


  1. First, let's log in to your vagrant instance:

    Code Block
    $ vagrant ssh
  2. Switch to the edxapp user:

    Code Block
    $ sudo su edxapp
  3. 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
    languagepy
    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 --staff --superuser --settings=devstack
  4. Confirm that you have access to the admin portal by logging in with your new account to LMS Admin

...

Page Properties
hiddentrue
 
Related issues