django--基本命令
django优点:
1.实现功能简单方便,站在巨人的肩膀上
2.app理念好,可以随意添加,不影响系统
3.自助管理后台
缺点:
1.紧耦合,难以二次开发
2.异步性能不如tornado
基本命令:
1.创建项目:
django-admin startproject project_name
注意点:1.不要中划线-
2.不要和Python第三方库或者django中模块名字冲突,test不能用
2.新建APP
python manage.py startapp app_name
3.同步数据库
检查是否有更新:python manage.py makemigrations
更新操作:python manage.py runserver
4.启动服务
启动django服务:python manage.py runserver 0.0.0.0 xxxx
5.创建超级管理员
python manage.py createsuperuser
浙公网安备 33010602011771号