Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set Session engine?

Tags:

django

While trying to use cookies, I have trying to follow the vendor's documentation. In the documentation, I have seen this sentence Set SESSION_ENGINE to "django.contrib.sessions.backends.cache" for a simple caching session store. but I could not find the place to change the session settings. How can I set Session engine ?

like image 443
mavzey Avatar asked Dec 01 '22 22:12

mavzey


2 Answers

Have you done the tutorial yet? If not, it's a very good place to start.

All Django settings are in the project/settings.py file.

Update for comment:

The default settings are in django/conf/global_settings.py. DO NOT modify this file! All of the settings in there can be overridden in your project's settings.py file.

like image 39
Peter Rowell Avatar answered Dec 03 '22 12:12

Peter Rowell


Just try to put in the settings.py

SESSION_ENGINE = "django.contrib.sessions.backends.cache" 
like image 140
Rafał Łużyński Avatar answered Dec 03 '22 11:12

Rafał Łużyński