摘要:
from django.utils.deprecation import MiddlewareMixin from django.shortcuts import redirect, HttpResponse from django.urls import reverse from www impo 阅读全文
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> body{ margin: 0; } .pg-header { height: 48px; background-c 阅读全文
摘要:
from django.core.management.base import BaseCommand from ... import models class Command(BaseCommand): def handle(self, *args, **options): username = 阅读全文
摘要:
1.安装 安装axios npm install axios 2._aixos定义 import axios from "axios"; import {userInfoStore} from "@/stores/counter.js"; import router from "@/router/i 阅读全文
摘要:
1.代码 from django.utils.deprecation import MiddlewareMixin class CoresMiddleware(MiddlewareMixin): def process_response(self, request, response): respo 阅读全文
摘要:
一、认证(jwt) 1.安装`pyjwt`模块 pip install pyjwt 2.使用 login路由jwt编码 import jwt import datetime from django.conf import settings token = jwt.encode( payload={ 阅读全文
摘要:
现象: 可使用自定义指令v-per 实现: 1.index.js文件 import per from "./per" import per2 from "./per2" // 在 JavaScript 中,{} 确实表示一个对象,这个对象可以包含键值对。然而,per 和 per2 不是字典的键,而是 阅读全文