I need help in django

How do I post in authenticated users? It’s giving an error on the line / message = Publicacao(text=data[‘text’], username=user)
I need the post to enter the user’s publications (User)

image

What’s your background with Django so far? Is this your first project? What training have you had to this point?

Also, when creating topics for discussion here, it’s a lot more helpful if the title is descriptive of the problem and not just “I need help in Django”.

You are only showing some information and your question is general so we can’t just guess what or where is the issue. Please post specific questions and also more code is needed. We need to see your models.py

did you do makemigrations and migrate already?

I’m a beginner, I’m studying about

I already did the migrations

What I’m trying to do is, doing a post on an authenticated user

Publicacao doen’t have a field called username so you are trying to add that but it is not in place in your model.

1 Like