Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the purpose of Django's session framework?
Django's session framework stores and retrieves data on a per-site-visitor basis. It lets you keep information about users across requests without requiring them to log in.
Click to reveal answer
beginner
Where do you configure the session engine in a Django project?
You configure the session engine in the settings.py file using the SESSION_ENGINE setting.
Click to reveal answer
intermediate
Name two built-in session backends provided by Django.
Forgetting sessions are built-in, no INSTALLED_APPS needed
Blaming cookie age for file write errors
5. You want sessions to expire when the user closes the browser but also want to keep sessions for 1 hour if the browser stays open. Which settings combination achieves this?
hard
A. SESSION_EXPIRE_AT_BROWSER_CLOSE = False and SESSION_COOKIE_AGE = 3600
B. SESSION_EXPIRE_AT_BROWSER_CLOSE = True and SESSION_COOKIE_AGE = 3600
C. SESSION_EXPIRE_AT_BROWSER_CLOSE = True and SESSION_COOKIE_AGE = None
D. SESSION_EXPIRE_AT_BROWSER_CLOSE = False and SESSION_COOKIE_AGE = None