We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d84de0 commit a857d58Copy full SHA for a857d58
simple_history/middleware.py
@@ -1,7 +1,12 @@
1
from . models import HistoricalRecords
2
3
+try:
4
+ from django.utils.deprecation import MiddlewareMixin as MiddlewareBase
5
+except ImportError: # Django < 1.10
6
+ MiddlewareBase = object
7
-class HistoryRequestMiddleware(object):
8
+
9
+class HistoryRequestMiddleware(MiddlewareBase):
10
"""Expose request to HistoricalRecords.
11
12
This middleware sets request as a local thread variable, making it
0 commit comments