2024年2月23日
摘要: django5 升级后,退出LogoutView发生了变化, =》(1)urls.py from django.contrib.auth.views import LogoutView path('logout/', LogoutView.as_view(), name="logout"), (2) 阅读全文
posted @ 2024-02-23 13:40 koolman 阅读(14) 评论(0) 推荐(0) 编辑
  2024年2月2日
摘要: settings.py STATIC_URL = 'static/' # Default primary key field type # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field DEFAULT_A 阅读全文
posted @ 2024-02-02 10:49 koolman 阅读(1) 评论(0) 推荐(0) 编辑
  2023年1月12日
摘要: 在使用Django项目打印时间时发现与系统时间不一样,原因是django默认使用的是格林尼治的时间,与北京时间差八个小时解决办法:在Django的配置文件settings.py中,有两个配置参数是跟时间与时区有关的,分别是TIME_ZONE和USE_TZ 如果USE_TZ设置为True时,Djang 阅读全文
posted @ 2023-01-12 16:03 koolman 阅读(131) 评论(0) 推荐(0) 编辑
  2023年1月11日
摘要: 前端密码,要实现登录记忆,密码不能直接存储在原密文,必须加密存储,否则相当于裸奔了。 username:lili password:111111(这个需要加密-解密) 实现方法: 1. npm install crypto-js ==》 dir node_modules 2023-01-11 09: 阅读全文
posted @ 2023-01-11 09:12 koolman 阅读(1195) 评论(0) 推荐(0) 编辑
  2023年1月9日
摘要: uniapp #login.vue onReady() {//记住密码 //缓存的账号 const QS_username = uni.getStorageSync('QS_username'); //缓存的密码 const QS_password = uni.getStorageSync('QS_ 阅读全文
posted @ 2023-01-09 12:09 koolman 阅读(78) 评论(0) 推荐(0) 编辑
  2023年1月8日
摘要: 一、前端:uniapp准备文件 uploadImage(){ let that = this uni.chooseImage({ count:1, sizeType:['compressed'], sourceType: ['camera','alumb'], success(res) { let 阅读全文
posted @ 2023-01-08 12:01 koolman 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 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:05 koolman 阅读(127) 评论(0) 推荐(0) 编辑
  2023年1月7日
摘要: 参考资料: https://blog.csdn.net/m0_59214979/article/details/120674901 阅读全文
posted @ 2023-01-07 14:01 koolman 阅读(39) 评论(0) 推荐(0) 编辑
  2023年1月4日
摘要: 先看图 准备工作 一、前端:参数准备vehicle_number / phone search(){ uni.request({ url: 'http://192.168.1.78:8000/api_v1/customer/get_customer_info/', method: 'GET', he 阅读全文
posted @ 2023-01-04 14:07 koolman 阅读(27) 评论(0) 推荐(0) 编辑
  2023年1月2日
摘要: Django-后端跨域-2步骤 一、安装插件 pip install django-cors-headers 二、设置 #1INSTALLED_APPS = [ "corsheaders", ] #2 MIDDLEWARE = [ 'corsheaders.middleware.CorsMiddle 阅读全文
posted @ 2023-01-02 15:44 koolman 阅读(16) 评论(0) 推荐(0) 编辑