1. 创建web目录
django-admin.py startproject mysite
2. 启动web服务
python manage.py runserver
python manage.py runserver 8080
python manage.py runserver 0.0.0.0:8080
3. 修改默认时区为中国时区:
修改settings.py
TIME_ZONE = 'Asia/Shanghai'
有网友说改成'Asia/Shanghai',偶尔也会出现时差问题,也可以改成:
TIME_ZONE = 'Etc/GMT-8'