timezone added
This commit is contained in:
parent
47cb55ab92
commit
b5b5be3007
@ -9,7 +9,14 @@ class AnalyticsMiddleware:
|
||||
self.get_response = get_response
|
||||
|
||||
def __call__(self, request):
|
||||
ip = request.META.get('REMOTE_ADDR')
|
||||
# ip = request.META.get('REMOTE_ADDR')
|
||||
# 1. Get the real IP
|
||||
x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')
|
||||
if x_forwarded_for:
|
||||
# Get the first IP in the list (the original client)
|
||||
ip = x_forwarded_for.split(',')[0].strip()
|
||||
else:
|
||||
ip = request.META.get('REMOTE_ADDR')
|
||||
|
||||
# LOG 1: Check if Middleware is even being triggered
|
||||
print(f"DEBUG: Middleware triggered for IP: {ip}")
|
||||
|
||||
@ -151,7 +151,7 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
TIME_ZONE = 'Asia/Riyadh'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user