随笔分类 - Django
摘要:def create(self, request, *args, **kwargs): token = request.META.get("HTTP_AUTHORIZATION") envir = get_cur_envir(token) request.data["environment"] =
阅读全文
摘要:https://wx-zhu6201976.blog.csdn.net/article/details/84677213 https://developer.aliyun.com/article/1095338
阅读全文
摘要:url('^task/reqs/(?P<pk>\d+)/$', patroltaskviews.PatrolTaskViews.as_view({"get":"getTaskReqs"})), 获取数字 url(r'^iteration/(?P<email>\S+)/$',IterationView
阅读全文
摘要:Djago authod: https://www.cnblogs.com/kaibindirver/p/16687787.html https://www.bilibili.com/video/BV1XR4y157rk?p=16&vd_source=caabcbd2a759a67e2a3de8ac
阅读全文
摘要:https://blog.csdn.net/qq_43030934/article/details/125657400 获取授权码的方法 163邮箱具体方法请参考:https://help.mail.163.com/faqDetail.do?code=d7a5dc8471cd0c0e8b4b8f4f
阅读全文
摘要:通过CONN_MAX_AGE优化Django的数据库连接 https://www.cnblogs.com/aaron-agu/p/10380559.html https://blog.csdn.net/cpxsxn/article/details/108492289 DATABASES = { 'd
阅读全文
摘要:首先你要了解有外键的模式是怎么插入数据的 https://www.cnblogs.com/kaibindirver/p/16923586.html 写入相关 方法一 Serializers 重写create方法即可 class MemberSerializers(serializers.ModelS
阅读全文
摘要:https://blog.csdn.net/DAO_HUNG/article/details/126544050
阅读全文
摘要:from utils.response import APIRespones from rest_framework.viewsets import ModelViewSet #统一请求成功返回模版 class MyModelViewSet(ModelViewSet): def create(sel
阅读全文
摘要:from rest_framework.response import Response # 公用的响应 class APIRespones(Response): """ Respones({ 'status':0, 'msg':'ok', 'results':[], 'token':'', })
阅读全文
摘要:https://blog.csdn.net/qq_41470573/article/details/120505432 https://www.runoob.com/django/django-orm-2.html (看这个) 多对多 会生成多一张关系表 一对多就不会生成一张关系表 (外键写到多的那
阅读全文
摘要:单独使用 https://www.jianshu.com/p/e36236c1df08 https://www.cnblogs.com/yangxinpython/p/15657010.html 例子: from apscheduler.schedulers.blocking import Bloc
阅读全文
摘要:request.query_params.getlist 方法 ?&department_id=68&department_id=69 def get(self,request): # 部门id id=request.query_params.getlist("department_id",0)
阅读全文
摘要:https://blog.csdn.net/xu710263124/article/details/104567580/ 删除所有更改的记录 sudo python3 manage.py makemigrations --fake (这个执行后报错) python3 manage.py migrat
阅读全文
摘要:python3 manage.py runserver >> /Users/lucax/Desktop/test/log/log.log 2>&1
阅读全文
摘要:Django 2.1.10 'DIRS': [os.path.join(BASE_DIR, 'templates')], # 修改位置 使用 视图层 def email(self, request, *args, **kwargs): return render(request,"testing.h
阅读全文
摘要:https://www.bilibili.com/video/BV1z64y197Dk?p=19&vd_source=caabcbd2a759a67e2a3de8acbaaf08ea 依赖库安装 django-filter==22.1 setting.py INSTALLED_APPS = [ 'd
阅读全文
摘要:https://www.bilibili.com/video/BV1z64y197Dk?p=20&vd_source=caabcbd2a759a67e2a3de8acbaaf08ea views.py from rest_framework.filters import OrderingFilter
阅读全文
摘要:https://zhuanlan.zhihu.com/p/286671626 https://www.bilibili.com/video/BV1z64y197Dk?p=21&vd_source=caabcbd2a759a67e2a3de8acbaaf08ea 全局配置分页器 setting.py
阅读全文
摘要:https://www.bilibili.com/video/BV1z64y197Dk?p=18&vd_source=caabcbd2a759a67e2a3de8acbaaf08ea
阅读全文

浙公网安备 33010602011771号