随笔分类 -  django

摘要:vue里的代码 views里的代码 settings.py 里面配置 阅读全文
posted @ 2020-03-07 16:02 酷爱。 阅读(1840) 评论(0) 推荐(0)
摘要:批量删除和删除是一样的只是有一点点的变化 阅读全文
posted @ 2019-12-29 15:28 酷爱。 阅读(142) 评论(0) 推荐(0)
摘要:1,首先vue跨域我知道两种 ,一种在config文件下,index.js里面配置跨域: module.exports = { dev: { // Paths assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: { '/a 阅读全文
posted @ 2019-11-25 22:48 酷爱。 阅读(842) 评论(0) 推荐(0)
摘要:# 模糊搜索views.pyclass Sousou(APIView): def post(self, request): sou = request.data.get('sou') #从前端接收的值 if not sou: return Response({'code': 10020, 'mess 阅读全文
posted @ 2019-11-12 17:10 酷爱。 阅读(585) 评论(0) 推荐(0)
摘要:# 添加学生class Addstu1(APIView): def post(self,request): data = request.data data['img'] = '123456' # img直接写成了死的数据 print(data) ss=Stuerializers1(data=dat 阅读全文
posted @ 2019-11-10 00:15 酷爱。 阅读(486) 评论(0) 推荐(0)
摘要:django的增删改查 阅读全文
posted @ 2019-10-23 22:46 酷爱。 阅读(141) 评论(0) 推荐(0)
摘要:2. 程序目录 3. 配置文件 a、数据库 支持SQLite 3(默认)、PostgreSQL 、MySQL、Oracle数据库的操作 # 默认是SQLit 3 的配置 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3' 阅读全文
posted @ 2019-08-04 00:47 酷爱。 阅读(146) 评论(0) 推荐(0)