Below are some notes taken from the DjangoGirls Chicago workshop.
Command(Apple)+Space and search for Terminal
cd mydir # change directory
cd .. # go up a directory
mkdir # create a directory
rm -rf mydir # delete a directory and children
pwd -P # print the full directory path
Search for the PowerShell program
cd mydir
cd .. # go up a directory
mkdir mydir
rmdir /S mydir
python -m venv myvenv
source myvenv/bin/activate
python -m pip install Django==1.8
mkdir djangogirls
cd djangogirls
django-admin.py startproject mysite .
python manage.py startapp blog
TODO
Edit settings.py for timezone, language, database
Edit blog: views.py, urls.py, models.py
Edit mysite: urls.py
# start a project called mysite (assumes your are in empty directory)
django-admin.py startproject mysite .
# run the development server
python manage.py runserver
# collect static files to a single destination
python manage.py collectstatic
# create superuser to be able to login to admin
python manage.py createsuperuser
# Run these commands whenever you first touch or change your models.py file
python manage.py makemigrations
python manage.py migrate
# Run this command the very first time you create a project on a machine
python manage.py migrate
# Step 1. Create a git repo
git init
git add -A
# Step 2. Commit a git repo
git commit -m "my initial commit"
# Step . Add the remote repo address to your local repo
TODO
git remote add
# Step 3. Push the local git repo to GitHub
git push origin master
Step 4. Create virtualenv environment on webserver
TODO:
Step . Install Django and Wheel
Step . Collect static files
Step . Run migrations (e.g. create necessary data tables)
Step . Configure the virtualenv setting for PythonAnywhere
Step . Configure the wsgi.py file for PythonAnywhere
Step . Pull down code from GitHub
Step . Reload the server