examerioLogin
← Fullstack with Vue.jsQuestion 60 of 62

How does Django populate request.user?

📘 Explanation

AuthenticationMiddleware runs on each request and sets request.user based on the session before your view code executes, so it's already available when the view runs. The other options are incorrect because user assignment isn't tied to the URL query string, the URL routing phase, or manual header checks inside the view.

Related questions

← PreviousNo login needed