virtualenv viantProject
cd viantProject
source bin/activate
pip install django==1.7.2
pip freeze //show all the module in this virtual environment
pip freeze > requirements.txt
pip uninstall django //uninstall django from virtual environment
pip install -r requirements.txt //download all modelus from reuirements.txt
django-admin.py startproject viantProject
mkdir static //在virtualenv根目录创建一个static folder用来存放static file
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
database settings
pip install MySQL-python
python manage.py shell
python manage.py startapp app_name
python manage.py validate //检查模型的语法和逻辑是否正确
//如何配置django rest framework
pip install djangorestframework
pip install pygments
pip install httpie
pip install markdown
pip install django-filter
pip install djangorestframework-jwt