每个人,我创建了一个博客帖子,所以每当我想要添加一个新的博客帖子时,我都会收到这个错误Cannot assign "<SimpleLazyObject: <CustomUser: exa@no.com>>": "Blog.doctor" must be a "Doctor" instance.这是我的views.py
class Blog
我正试图在我的模型中使用保存方法来存储当前已锁定的用户。我正在使用django-current用户来获得经过身份验证的用户。我写了这段代码 get_current_user, get_current_authenticated_user**kwargs)Tried to update field professional.Citation.uploaded_by with
我为我的项目创建了一个自定义用户模型。并且我创建的额外文件不会显示在Admin页面中。 我只看到了标准字段,没有额外的made。我在网上找不到我错过的东西。我的customuser模型: from django.contrib.auth.models import AbstractUser
classfrom d