摘要:
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 阅读全文
posted @ 2019-11-04 18:58
芦苇草鱼
阅读(676)
评论(0)
推荐(0)
摘要:
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... 阅读全文
posted @ 2019-11-04 16:49
芦苇草鱼
阅读(1245)
评论(0)
推荐(0)
摘要:
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 阅读全文
posted @ 2019-11-04 12:14
芦苇草鱼
阅读(175)
评论(0)
推荐(0)
浙公网安备 33010602011771号