Loading

摘要: 根urls.py from django.contrib import admin from django.urls import path, include, re_path from django.views.static import serve from django.conf import 阅读全文
posted @ 2024-09-17 15:51 一只大学生 阅读(11) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2024-09-17 15:42 一只大学生 阅读(4) 评论(0) 推荐(0)
摘要: 1.使用示例 from utils.view import BaseView class VideoView(BaseView, ModelViewSet): # ... # return Response({"code": 0, "data": context}) return Response( 阅读全文
posted @ 2024-09-17 00:51 一只大学生 阅读(11) 评论(0) 推荐(0)
摘要: onMounted:在组件的 DOM 元素被挂载到页面后调用 阅读全文
posted @ 2024-09-14 11:53 一只大学生 阅读(9) 评论(0) 推荐(0)
摘要: router.beforeEach((to, from, next) => { if (to.name "login") { next() return; } // 用户是否已登录 const info = userInfoStore() if (!info.userToken) { next({" 阅读全文
posted @ 2024-09-13 22:55 一只大学生 阅读(9) 评论(0) 推荐(0)
摘要: flex默认属性 在 CSS 中,flex 是一个用于布局的属性,它使元素能够按照灵活的方式排列。默认情况下,flex 布局的属性有几个关键特性。以下是一些常见的默认属性: display: flex; 使容器成为一个弹性容器,默认情况下,容器的子元素(flex 项目)会被水平排列。 flex-di 阅读全文
posted @ 2024-09-12 23:25 一只大学生 阅读(37) 评论(0) 推荐(0)
摘要: 1.创建vue项目 npm create vue@latest 2.下载依赖 cd "项目根目录" npm install axios element-plus npm install 3.main.js中引入包 // 引入element-plus import ElementPlus from ' 阅读全文
posted @ 2024-09-12 02:45 一只大学生 阅读(76) 评论(0) 推荐(0)
摘要: 法一: navicat迁移数据库 day36-03文件 2:46位置 (法二:代码实现,可以自己查下,day13项目部署时张开老师有带着做) 运行项目时: 1.运行项目时注意python解释器,django,mysql等版本要对应 2.迁移数据库 3.账号密码在day36-05文件后面14:49位置 阅读全文
posted @ 2024-09-12 01:41 一只大学生 阅读(13) 评论(0) 推荐(0)
摘要: position可选 static静态定位:不需要定位 relative相对定位:相对自己原来位置 absolute绝对定位:相对于祖先定位元素(一般为relative)脱离文档流 fixed固定定位:固定窗口某一位置,脱离文档流 sticky粘性定位:浏览器窗口到达指定阈值时显示 z-index只 阅读全文
posted @ 2024-09-11 23:01 一只大学生 阅读(30) 评论(0) 推荐(0)
摘要: 1.filter示例 from django.template import Library register = Library() @register.filter def has_permission(request, route_name): is_super = request.user_ 阅读全文
posted @ 2024-09-08 11:00 一只大学生 阅读(19) 评论(0) 推荐(0)