Django+前端\django\myweb\blog\middleware\auth.py from django.utils.deprecation import MiddlewareMixin from dja […]
Django+HTML前端
Django Redis Caches Django 使用 redis缓存 pip install django_redis pip install hiredis 非必要 # 前端\django\myweb\myw […]
文件上传 简单的文件上传 # 前端\django\myweb\blog\views\upload.py from django.shortcuts import render # 文件上传 def upload_li […]
数据统计 echarts: https://echarts.apache.org/examples/zh/index.html#chart-type-bar # 前端\django\myweb\myweb\urls. […]
Ajax 浏览器向网站发送请求时,URL 和 表单的形式提交,特点: 页面刷新 GET POST Ajax可以实现向后台偷偷发送请求 依赖JQuery 编写Ajax代码 简单示例: task_list.html DO […]
用户认证 Cookie和Session cookie是http请求header中的一个属性,是浏览器持久化存储数据的一种机制,因为网页无法直接访问浏览器所在主机的文件系统,所以网页要通过向cookie中存储键值对(C […]
密码验证与MD5加密模块 密码验证 前端\django\myweb\blog\utils\password.py import string import re def check_fips_password_com […]
ModelForm init优化 # utils/modelform.py from django import forms class BootStrapModelForm(forms.ModelForm): de […]
Django 时间插件 bootstrap-datetimepicker 方法 {% block css %} {% load static %} <link rel="stylesheet" […]
自定义验证规则 # 自定义验证规则 方式一 from django.forms import Form from django.forms import widgets from django.forms impor […]
Djiango-用户管理 创建一些用户数据 insert into blog_employee(name,password,age,account,create_time,gender,depart_id) valu […]