所以我使用了一个定制的用户模型from django.contrib.auth.models import AbstractBaseUserreturn self.active from django.contrib import admin
from django.contrib.auth.modelsdoes not have access
我在没有主键的情况下设置了我的User模型,以便使用自动id。但是,当我试图使用Django的"_set“符号访问它时,它是通过外键引用的: post = Post.objects.get(pk=pk我从MySQL得到一个错误:
OperationalError at /webApp/postDetail/42/ (1