- CentOS
7.X
- Python 3.X
- Django
1.15
- Docker
- MySQL
Server version: 5.5.52 MySQL Community Server
Linux
的基础知识- 常用的
Linux Shell
命令或脚本 Docker
的基础知识- Python 编程基础
- Python的基础语法
- Python 正则表达式
- HTML JavaScript CSS 的基础
- HTTP协议 基础知识
Request
Response
ContentType
讲义的目录结构
~/working/django-leaning/ch01
~/working/django-leaning/ch02
~/working/django-leaning/ch02/ch02.md
~/working/django-leaning/ch02/mysite
~/working/django-leaning/ch03/ch03.md
~/working/django-leaning/ch03/mysite
...
docker rm pythonzero
docker run -m 2048m -it --name pythonzero -p 38000:8000 -v /Users/devuser/working:/usr/src/myapp -w /usr/src/myapp --link some-redis:redis --link some-mysql:mysql -w /usr/src/myapp python:latest /bin/bash
pip install Django==1.11.5
后续我们要链接数据库 MySQL
,所以需要安装如下 package
pip install mysqlclient
git clone https://github.com/django/django.git
# python
Python 3.6.2 (default, Sep 13 2017, 14:26:54)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print( django.get_version())
1.11.5
>>>
快速验证版本
python -m django --version