How do I get the first name and last name of a logged in user in Django?
You want the first_name and last_name attributes: request.user.first_name and request.user.last_name
I need to get the first name and last name of a user for a function in my views How do I do that? What is the syntax for it? I used request.user.email for the email, but I don't know see an option for a first name or last name. How do I go about doing this?
Should I import the model into the views and then use it?