Skip to content

Instantly share code, notes, and snippets.

@prodeveloper
Created September 25, 2017 09:08
Show Gist options
  • Save prodeveloper/aa5f6373ecd04a511c74dda868af2816 to your computer and use it in GitHub Desktop.
Save prodeveloper/aa5f6373ecd04a511c74dda868af2816 to your computer and use it in GitHub Desktop.
Script to configure Django template in C9 to python3
#Default user: ubuntu password: fdhFz8bgca9jcEZ
#Install python 3
sudo mv /usr/bin/python /usr/bin/python2
sudo ln -s /usr/bin/python3 /usr/bin/python
#setup python
sudo pip install django
python manage.py makemigrations
python manage.py migrate
python manage.py startapp firstapp
#Create a default super user
echo "from django.contrib.auth.models import User; User.objects.filter(email='student@akirachix.com').delete(); User.objects.create_superuser('ubuntu', 'student@akirachix.com', 'fdhFz8bgca9jcEZ')" | python manage.py shell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment