Answer the question
In order to leave comments, you need to log in
How to pass the name of the authorized user in views.py?
Hello, I ran into a problem that I can not pass the user who logged in to the view. In the template, if I write {{request.user}}, then it gives out a name, but I don’t understand how to pass it to the view. Read the documentation, did not find the answer.
Answer the question
In order to leave comments, you need to log in
The view either has request (function-based) or self.request (class-based) in its arguments
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question