Django';s AUTH_PROFILE_模块(用户配置文件)行为不正常

Django';s AUTH_PROFILE_模块(用户配置文件)行为不正常,django,django-templates,Django,Django Templates,错误- "Caught FieldError while rendering: Cannot resolve keyword 'user' into field. Choices are: id, is_active_online, person" 模型- AUTH_PROFILE_MODULE = 'account.UserProfile' class UserProfile(models.Model): person = models.OneToOneField(U

错误-

"Caught FieldError while rendering: Cannot resolve keyword 'user' into field.
 Choices 
are: id, is_active_online, person"
模型-

AUTH_PROFILE_MODULE = 'account.UserProfile'

class UserProfile(models.Model):
    person      = models.OneToOneField(User)
    is_active_online = models.NullBooleanField(null = True, default = None)
模板中错误的来源-

{{ user_object.get_profile.is_active_online }}
可能是什么问题

若要使用此功能,请定义一个带有字段的模型 要存储的其他信息,或其他方法 您希望有可用的,并添加一个名为user的OneToOneField 从您的模型到用户模型


您的
OneToOneField
需要命名为
user

@Sussagittikasusa,我不确定。。。我会帮你查资料的,但是现在时间不多了!