-
Book Overview & Buying
-
Table Of Contents
Mastering Django: Core
By :
By default, Django stores sessions in your database (using the model django.contrib.sessions.models.Session). Though this is convenient, in some setups it's faster to store session data elsewhere, so Django can be configured to store session data on your filesystem or in your cache.
If you want to use a database-backed session, you need to add 'django.contrib.sessions' to your INSTALLED_APPS setting. Once you have configured your installation, run manage.py migrate to install the single database table that stores session data.
For better performance, you may want to use a cache-based session backend. To store session data using Django's cache system, you'll first need to make sure you've configured your cache; see the cache documentation for details.
You should only use cache-based sessions if you're using the Memcached cache backend. The local-memory cache backend doesn...
Change the font size
Change margin width
Change background colour