Versions Compared

Key

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

...

  • list all manage.py commands - sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws production help
  • create a final grade and generate a certificate for a single user - sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws settings production regenerate_user -u honor@example.com -c edX/Open_DemoX/edx_demo_course
  • create or upgrade a user to superuser
    • Execute the following commands (updating the username and email account appropriately)

      Code Block
      languagetext
      > sudo su edxapp -s /bin/bash
      > cd
      > /edx/bin/python.edxapp /edx/bin/manage.edxapp lms manage_user staff staff@example.com --staff --superuser --settings=awsproduction


    • See also Creating an admin user in LMS/CMS, which is written for devstack
  • set or change password - sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws settings production changepassword user
  • launch the django shell - sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws settings production shell
  • importing a course from github

...

  cd /var/tmp
  git clone https://github.com/edx/edx-demo-course.git
  cd /edx/app/edxapp/edx-platform
  sudo -u www-data /edx/bin/python.edxapp ./manage.py cms --settings=awsproduction import /edx/var/edxapp/data  /var/tmp/edx-demo-course 
  • run migrations

    sudo su edxapp -s /bin/bash
    cd ~
    source edxapp_env
    python /edx/app/edxapp/edx-platform/manage.py {lms/cms} syncdb --settings=awsproduction 
  • delete course - sudo -u www-data /edx/bin/python.edxapp ./manage.py cms --settings=aws production delete_course Organization/CourseNumber/CourseRun commit ** delete course in Cypress version ** - sudo -u www-data /edx/bin/python.edxapp ./manage.py cms --settings=aws production delete_course course-v1:Organization+CourseNumber+CourseRun commit

(it is possible that you would need the aws setting even if not on AWS)

See help and help <cmd> for more information!

...

cd /edx/app/edxapp/edx-platform
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms runserver 8000 --settings awsproduction 

When you connect your browser requests will go to the debug server instead of gunicorn through nginx. You will still need to compile static assets of they change

...

# Generate or regenerate a certificate for a single user in a course
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings awsproduction regenerate_user -u honor@example.com -c edX/Open_DemoX/edx_demo_course --insecure # Grade and generate certs for all users in a course sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings awsproduction ungenerated_certs -c edX/Open_DemoX/edx_demo_course --insecure 

...

  • sudo -H -u edxapp bash
  • source /edx/app/edxapp/edxapp_env
  • cd /edx/app/edxapp/edx-platform
  • paver update_assets cms --settings=awsproduction
  • paver update_assets lms --settings=awsproduction

Suggest issuing the following to debug issues with r.js optimizer issues

  • python manage.py cms --settings=aws production collectstatic --noinput
  • python manage.py lms --settings=aws production collectstatic --noinput

Generating dummy translations

...