Skip to content
Advertisement

How to resolve user into the field?

I’m creating a simple To Do app using Django 3.2, and I have stuck in a error which is: FieldError: Cannot resolve keyword 'user' into field. Choices are: content, created, email, id, name, user1, user1_id

This is models.py:

JavaScript

forms.py

JavaScript

views.py

JavaScript

home.html

JavaScript

By far, any data that is added can be access by every account, but what i’m trying to do is that each user has his own data or tasks in this case. Would appreciate any idea! Thanks

Advertisement

Answer

i think your problem is here

JavaScript

Advice:Please try to change the User in models.py to an other name because Django has by default a model called User.

Advertisement