@@ -18,6 +18,42 @@ and ``Session`` model to add following features:
18
18
19
19
- Sessions store IP and User Agent
20
20
21
+
22
+ Comparison
23
+ ==========
24
+
25
+ Here is a brief comparison between Django's session backends (db, cache, cached_db), `django-user-sessions `_, and django-qsessions.
26
+
27
+ +-------------------------+----+--------+-----------+----------------------+------------------+
28
+ | | db | cache | cached_db | django-user-sessions | django-qsessions |
29
+ +=========================+====+========+===========+======================+==================+
30
+ | Better Performance | | ✔✔ | ✔ | | ✔ |
31
+ +-------------------------+----+--------+-----------+----------------------+------------------+
32
+ | Persistent | ✔ | | ✔ | ✔ | ✔ |
33
+ +-------------------------+----+--------+-----------+----------------------+------------------+
34
+ | Query by User | | | | ✔ | ✔ |
35
+ +-------------------------+----+--------+-----------+----------------------+------------------+
36
+ | Store IP and User Agent | | | | ✔ | ✔ |
37
+ +-------------------------+----+--------+-----------+----------------------+------------------+
38
+
39
+
40
+
41
+
42
+ Requirements
43
+ ============
44
+
45
+ +----------------+-----------------+
46
+ | Python version | Django versions |
47
+ +================+=================+
48
+ | 3.6 | 2.0, 1.11, 1.10 |
49
+ +----------------+-----------------+
50
+ | 3.5 | 2.0, 1.11, 1.10 |
51
+ +----------------+-----------------+
52
+ | 3.4 | 2.0, 1.11, 1.10 |
53
+ +----------------+-----------------+
54
+ | 2.7 | 1.11, 1.10 |
55
+ +----------------+-----------------+
56
+
21
57
Installation
22
58
============
23
59
@@ -42,7 +78,7 @@ using another session backend, you need to migrate sessions manually.
42
78
``'django.contrib.sessions.middleware.SessionMiddleware' `` with
43
79
``'qsessions.middleware.SessionMiddleware' ``.
44
80
45
- - Add ``SESSION_ENGINE = 'qsessions.backends.cached_db' ``.
81
+ - Set ``SESSION_ENGINE `` to `` 'qsessions.backends.cached_db' ``.
46
82
47
83
(4) Run migrations to create ``qsessions.models.Session `` model.
48
84
0 commit comments