diff options
author | Palaparthy Adityachandra | 2020-03-20 11:12:52 +0530 |
---|---|---|
committer | GitHub | 2020-03-20 11:12:52 +0530 |
commit | e8573822d3ed25306d5d2faf946633f2c17997b0 (patch) | |
tree | c75b5d2730a74191f2c7e51a881e9404f5627c1d /yaksh/middleware | |
parent | 1dbaec7dd8098701e11713faa0c9040a315e5fac (diff) | |
parent | 36f43151ab26744cf9edc05d0df3f0fb901fcaaa (diff) | |
download | online_test-e8573822d3ed25306d5d2faf946633f2c17997b0.tar.gz online_test-e8573822d3ed25306d5d2faf946633f2c17997b0.tar.bz2 online_test-e8573822d3ed25306d5d2faf946633f2c17997b0.zip |
Merge pull request #655 from adityacp/bump_django
Bump django version to 3.0.3
Diffstat (limited to 'yaksh/middleware')
-rw-r--r-- | yaksh/middleware/one_session_per_user.py | 7 | ||||
-rw-r--r-- | yaksh/middleware/user_time_zone.py | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/yaksh/middleware/one_session_per_user.py b/yaksh/middleware/one_session_per_user.py index 1ed1786..3b8d302 100644 --- a/yaksh/middleware/one_session_per_user.py +++ b/yaksh/middleware/one_session_per_user.py @@ -20,6 +20,13 @@ class OneSessionPerUserMiddleware(object): Link: https://docs.djangoproject.com/en/1.5/topics/auth/customizing/ #extending-the-existing-user-model """ + + def __init__(self, get_response): + self.get_response = get_response + + def __call__(self, request): + return self.get_response(request) + def process_request(self, request): """ # Documentation: diff --git a/yaksh/middleware/user_time_zone.py b/yaksh/middleware/user_time_zone.py index 206c08a..92035e8 100644 --- a/yaksh/middleware/user_time_zone.py +++ b/yaksh/middleware/user_time_zone.py @@ -8,6 +8,12 @@ class TimezoneMiddleware(object): if user timezone is not available default value 'Asia/Kolkata' is activated """ + def __init__(self, get_response): + self.get_response = get_response + + def __call__(self, request): + return self.get_response(request) + def process_request(self, request): user = request.user user_tz = 'Asia/Kolkata' |