Web后端
Django、Flask、Tornado
本咸鱼也有梦想啦
这个作者很懒,什么都没留下…
展开
-
Flask、Tornado
django环境搭建命令原创 2019-12-12 14:43:16 · 758 阅读 · 0 评论 -
Django环境搭建
新建django项目File -> new project -> django配置数据库这里是MySQLDATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'drf_app', 'USER': 'root', ...原创 2019-12-11 20:16:27 · 123 阅读 · 0 评论 -
Django报错:chat.Chat.receiver: (fields.E304) Reverse accessor for 'Chat.receiver' clashes with reverse
执行迁移时报错:SystemCheckError: System check identified some issues:ERRORS:chat.Chat.receiver: (fields.E304) Reverse accessor for 'Chat.receiver' clashes with reverse accessor for 'Chat.sender'. ...原创 2019-12-11 20:14:11 · 482 阅读 · 0 评论 -
Django报错:django.core.exceptions.ImproperlyConfigured: The included URLconf 'module 'user.urls' from
执行迁移时报错:django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'user.urls' from 'D:\\stage3\\drf_app\\user\\urls.py '>' does not appear to have any patterns in it. If you se...原创 2019-12-11 20:14:16 · 7931 阅读 · 2 评论 -
Django页面报错:$ is not defined
Uncaught ReferenceError: $ is not defined at xxx解决:检查jquery引入是否正确setting.py中是否引入静态文件STATIC_URL = '/static/'STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static"),]setting.py中DEBUG...原创 2019-12-11 15:28:08 · 1436 阅读 · 0 评论 -
Django
文章目录配置流程1、配置路由2、设置路由地址的事件3、编写事件返回的html页面路由HttpResponse对象request包含的参数配置流程1、配置路由urls.py -> urlpatterns = [ ] 中添加路由path/url/re_path('index', views.index)‘index’ 是路由地址 http://127.0.0.1:8000/index...原创 2019-12-10 19:06:15 · 58 阅读 · 0 评论 -
DRF(二):分页、权限、授权、过滤、跨域
首页注册登录资源上传原创 2019-12-10 17:44:55 · 453 阅读 · 0 评论 -
DRF(一):配置、基本应用
restful接口/路由采用名词单数替代动词如,user替代adduser、deluser……更关注状态status201204DRFrequest.POST:POSTrequest.data:POST\PUT\PATCH原创 2019-12-07 13:59:06 · 230 阅读 · 0 评论 -
Django项目部署
文章目录安装secureCRT连接ubuntu的ip移动项目配置项目虚拟环境uwsgi启动项目安装secureCRT连接ubuntu的ipubuntu下先更新:sudo apt-get update安装ssh:sudo apt install ssh移动项目secureCRT中,alt+p进入SFTPlcd 项目文件在win下的路径cd 想要放置项目的ubuntu路径put -...原创 2019-12-06 14:12:29 · 101 阅读 · 0 评论