Created
September 25, 2017 09:08
-
-
Save prodeveloper/aa5f6373ecd04a511c74dda868af2816 to your computer and use it in GitHub Desktop.
Script to configure Django template in C9 to python3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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='[email protected]').delete(); User.objects.create_superuser('ubuntu', '[email protected]', 'fdhFz8bgca9jcEZ')" | python manage.py shell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment