文章分类 -  Django

wx_share_django
摘要:1.获取微信公众平台开发者ID和开发者密码, appId、secret 这个就需要 认证吗? 2.IP白名单中,把服务器的IP加进去 3.添加js域名 方案一: 1.将文件放到templates 2.urls.py path('MP_verify_BAUqsuDZjmT8tR8gr.txt', Te 阅读全文
posted @ 2024-08-20 18:30 koolman 阅读(9) 评论(0) 推荐(0)
有深度depth的serializers.py
摘要:serializers.py class CartInfoSerializer(serializers.ModelSerializer): class Meta: model = CartInfos fields = '__all__' # depth 根据外键关联实现序列化嵌套功能 depth = 阅读全文
posted @ 2023-12-05 20:33 koolman 阅读(10) 评论(0) 推荐(0)
urls.py_include
摘要:若报错 django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported. Set the app_name 阅读全文
posted @ 2023-12-05 20:29 koolman 阅读(19) 评论(0) 推荐(0)
admin.py里list_display万能列表
摘要:@admin.register(Order) class OrderAdmin(admin.ModelAdmin): list_display = list(key.name for key in Order._meta.fields) 阅读全文
posted @ 2023-12-05 10:29 koolman 阅读(2) 评论(0) 推荐(0)
前端uniapp上传文件-后台Django接收保存-第一版
摘要:一、前端:uniapp准备文件 uploadImage(){ let that = this uni.chooseImage({ count:1, sizeType:['compressed'], sourceType: ['camera','alumb'], success(res) { let 阅读全文
posted @ 2023-01-08 12:01 koolman 阅读(471) 评论(0) 推荐(0)
Django后台title修改-admin.py
摘要:admin.py修改 在admin.py下重写admin.site里面的属性值 site_header 设置页面上的内容site_title 页面左上角的title内容index_title 后台管理 # admin.py admin.site.site_header = ‘xx 项目管理系统’ a 阅读全文
posted @ 2023-01-08 09:04 koolman 阅读(175) 评论(0) 推荐(0)