上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: 1 <!DOCTYPE html> 2 <html lang="zh"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>冒泡和默认事件</title> 6 <style type="text/css"> 7 .sub { 8 width: 100px; 9 h 阅读全文
posted @ 2019-12-28 16:20 xuqidong 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1 from django.utils.deprecation import MiddlewareMixin 2 from django.shortcuts import redirect 3 4 class AuthMiddleware(MiddlewareMixin): 5 def proces 阅读全文
posted @ 2019-12-28 00:20 xuqidong 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1 多对多的关系,三种写法 2 -手动创建第三张表(不创建关联关系) 3 class Book(models.Model): 4 # 默认会创建id 5 name = models.CharField(max_length=32) 6 class Author(models.Model): 7 na 阅读全文
posted @ 2019-12-27 21:01 xuqidong 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1 1 写死静态文件:<link rel="stylesheet" href="/static/css/mycss.css"> 2 2 使用 static标签函数: 3 -{%load static%} 4 #static返回值,会拼上传参的路径 5 -{% static "传参"%} 6 3 使用 阅读全文
posted @ 2019-12-26 22:08 xuqidong 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1 2 模版之过滤器 2 -语法:{{第一个参数|过滤器名字:第二个参数}} 3 -常用过滤器:(详细用法见源码) 4 -length 5 -default 6 -slice 7 -date 8 -filesizeformat 9 -truncatechars 10 -truncatewords 1 阅读全文
posted @ 2019-12-25 22:53 xuqidong 阅读(124) 评论(1) 推荐(0) 编辑
摘要: 1 from django.shortcuts import render, HttpResponse 2 3 # Create your views here. 4 from django.core.paginator import Paginator, EmptyPage 5 from app0 阅读全文
posted @ 2019-12-23 23:37 xuqidong 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 1 数据库系列课程 2 MySQL 3 1.版本介绍和选择 4 2.安装 5 3.体系结构 6 4.SQL 7 5.索引及执行计划 8 6.存储引擎 9 7.日志 10 8.备份恢复 11 9.主从 12 10.高可用架构 13 11.高性能架构 14 15 Redis 16 1.安装配置 17 2 阅读全文
posted @ 2019-12-21 10:51 xuqidong 阅读(354) 评论(0) 推荐(0) 编辑
摘要: def login_auth(func): def inner(request,*args,**kwargs): is_login=request.COOKIES.get('is_login') if is_login: #代表登录了 return func(request,*args,**kwar 阅读全文
posted @ 2019-12-13 00:14 xuqidong 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 数据库系列课程MySQL 1.版本介绍和选择2.安装3.体系结构4.SQL5.索引及执行计划6.存储引擎7.日志8.备份恢复9.主从10.高可用架构11.高性能架构 Redis1.安装配置2.数据类型3.事务4.持久化5.高可用架构6.分布式7.API MongoDB1.安装配置2.用户管理3.CR 阅读全文
posted @ 2019-12-11 23:29 xuqidong 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 1 ''' 2 import logging 3 4 # 1. 控制日志级别 5 # 2. 控制日志格式 6 # 3. 控制输出的目标为文件 7 logging.basicConfig(filename='access.log', 8 format='%(asctime)s - %(name)s - 阅读全文
posted @ 2019-12-10 00:10 xuqidong 阅读(136) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页