Data Given: 09/19/2017
-
Use
git init
to create an empty repo. -
Use
git clone
to clone a remote repo.- Reference: git-clone
- In parent directory, use
git clone https://github.com/mattmacari/django-tut.git
- Open repos don't require authentication or authorization
-
To add a remote origin, use
git remote
.- (git-remote)[https://git-scm.com/docs/git-remote]
git remote add origin https://github.com/mattmacari/hubot.git
-
First commit, let's modify the README.md.
- Use cases for Virtual envs:
- Ensure code dependencies don't change between apps
- Create isolated environments that can be deployed on multiple machines.
- Better practice than using the root python install.
- To create a virtualenv using
virtualenv
runvirtualenv ./{env_name}
- For example,
virtualenv ./django-tut
- For example,
- Using conda use,
conda create -n django-tut
- Run django setup (already did).
- Use command
django-admin startproject mysite
- Use command
- Verify app works using
python manage.py runserver
- Start an app 'chess'
- Refactor settings module
- talk about settings
- Create first model
- Create objects in database
- Wire up first view
- write tests
- Write basic test for view
- setup admin site
- create some additional pieces
- create a list view