11 2019 档案

摘要:# 批量创建数据 # Create your views here. from django.db import models from django.shortcuts import HttpResponse from .models import Book import random def i 阅读全文
posted @ 2019-11-18 21:23 XuMou 阅读(227) 评论(0) 推荐(0)
摘要:报错环境 python=3.6.5,django=2.2,PyMySQL=0.9.3 …… django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3. 解决 阅读全文
posted @ 2019-11-17 20:29 XuMou 阅读(152) 评论(0) 推荐(0)
摘要:表关系图 models.py from django.db import models # Create your models here. class Teacher(models.Model): tid=models.AutoField(primary_key=True) tname=model 阅读全文
posted @ 2019-11-16 17:59 XuMou 阅读(224) 评论(0) 推荐(0)
摘要:1、例如我当前访问的路径是 127.0.0.1:8000/app01/customer/ 此时我需要在这个界面跳转另外一个界面127.0.0.1:8000/app02/books/,于是我定义一个a标签 <a href="url">跳转</a> 注意: 如果url=/app02/books/ (ap 阅读全文
posted @ 2019-11-14 11:30 XuMou 阅读(356) 评论(0) 推荐(0)
摘要:rbac/modes.py/class User() from django.contrib.auth.models import AbstractUser class User(AbstractUser): # 用户表 roles = models.ManyToManyField(to=Role, 阅读全文
posted @ 2019-11-11 16:16 XuMou 阅读(436) 评论(0) 推荐(0)