摘要:
1.app0 1 /models.py里面定义User代理模型Person.from django.db import modelsfrom django.contrib.auth.models import Userclass Person(User): class Meta: proxy = True @classmethod def get_blacklist(cls): return cl 阅读全文
摘要:
from django.shortcuts import render, HttpResponsefrom django.contrib.auth.models import Userfrom django.contrib.auth import authenticatedef test(request): # User.objects.create_user(username="zhi... 阅读全文
摘要:
1.url路由 path("test/", app01_views.test)2.views.py视图和基于模型的表单 from django.shortcuts import render, HttpResponse# Create your views here.from django.db import connectionfrom app01.models import *from dja 阅读全文