上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 24 下一页
摘要: ```python这个问题在Python3.6有时候会出现,说明是源码有bug这一块Your STATICFILES_DIRS setting is not a tuple or list; "ImproperlyConfigured: Your STATICFILES_DIRS setting is not a tuple or list; perhaps you forgot a traili... 阅读全文
posted @ 2020-03-31 21:54 大海一个人听 阅读(820) 评论(0) 推荐(0)
摘要: ```python【部署问题】解决Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid" failed(2:No such file or directory)解决方法:终端上直接输入下面这一句话执行命令就可以了,个人验证,亲测有效/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/ngi... 阅读全文
posted @ 2020-03-27 09:52 大海一个人听 阅读(1006) 评论(0) 推荐(0)
摘要: ```python git add . 的时候遇到warning: LF will be replaced by CRLF in ...... 解决办法 输 入 git add . 后出现 warning: LF will be replaced by CRLF in ...... The file will have its original line endings in your worki 阅读全文
posted @ 2020-03-26 12:59 大海一个人听 阅读(668) 评论(0) 推荐(0)
摘要: ```python 运行环境 PyCharm 2017.1 Django 2.0.1 python 3.6.1 使用相对路径引用Models模块 from .models import * 1 在同时存在多个apps的情况下,有机会报错 RuntimeError: Model class app_anme.models.Ad doesn't declare an explicit app_labe 阅读全文
posted @ 2020-03-12 17:56 大海一个人听 阅读(1871) 评论(0) 推荐(0)
摘要: 报错信息: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclient? 解决方式: 在settings.py配置文件中,添加pymysql的配置, im 阅读全文
posted @ 2020-03-04 21:38 大海一个人听 阅读(2181) 评论(0) 推荐(0)
摘要: ```python django的类视图拥有自动查找指定方法的功能,通过调用as_views()方法实现。 在探讨这个问题之前,先引入一段代码举个例子方便理解: 一般请求的判断方法: def View(request,*args,**kwargs): if request.method.lower() == 'get': do_something() if request.method.lower 阅读全文
posted @ 2019-12-31 21:13 大海一个人听 阅读(426) 评论(0) 推荐(0)
摘要: ```python 序列化家族 Serializer序列化(了解) 视图类 Serializer反序列化(了解) 视图类 序列化类 ModelSerializer序列化与反序列化(重点) 视图类 序列化类 模型类 序列化家族 """ 1、Serializer类:底层序列化类 - 了解类 重点:单表序列化 2、ModelSerializer类:模型序列化类 - 核心类 重点:多表序列化 3、List 阅读全文
posted @ 2019-12-30 08:52 大海一个人听 阅读(173) 评论(0) 推荐(0)
摘要: ```python 断关联表关系 外键字段属性 多表操作 断关联表关系 ''' 1.不会影响连表查询操作效率 2.会提升连表增删改操作效率 3.易于后期数据库表的重构 4.缺点:数据库本身设有连表检测,容易出现脏数据,需要通过严格的逻辑避免脏数据的参数(必要的时候管理脏数据) 举例: A依赖B,先插入A记录,该记录对应的B记录没产生,在没有关联的情况下,该操作可以实现,但是数据就是脏数据。接着再将 阅读全文
posted @ 2019-12-30 08:45 大海一个人听 阅读(203) 评论(0) 推荐(0)
摘要: 经典的生活价值观 BBS 项目开发逻辑梳理 第一步:先进行数据库设计 第二步settings配置 第三步功能开发 注册功能 后端开发逻辑: 前端开发逻辑: 上传头像文件功能,注册按钮功能 图片验证码功能 后端开发逻辑 图片验证码实时刷新功能 前端开发逻辑 登录功能 后端开发逻辑 前端开发逻辑 首页搭 阅读全文
posted @ 2019-12-29 15:52 大海一个人听 阅读(1398) 评论(0) 推荐(0)
摘要: ```pythonfrom rest_framework.views import APIViewfrom rest_framework.response import Responsefrom . import models, serializersfrom .response import APIResponse# 出版社群查class PublishAPIView(APIView): ... 阅读全文
posted @ 2019-12-27 21:16 大海一个人听 阅读(375) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 24 下一页