From 3d76637d846893e95be27195c383c356107b36a8 Mon Sep 17 00:00:00 2001 From: Faheed Date: Mon, 29 Dec 2025 14:48:44 +0300 Subject: [PATCH] local ip address removed from storing --- landing_page/tasks.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/landing_page/tasks.py b/landing_page/tasks.py index 4603272..375befb 100644 --- a/landing_page/tasks.py +++ b/landing_page/tasks.py @@ -5,14 +5,9 @@ from .models import VisitorLog def log_visitor_location(ip_address): # if ip_address in ['127.0.0.1', 'localhost']: # return - if ip_address.startswith(('127.', '192.168.', '10.', '172.16.')): - VisitorLog.objects.create( - ip_address=ip_address, - country="Local Network", - city="Development Machine", - region="Home" - ) - print(f"DEBUG: Logged local IP {ip_address}") + if ip_address.startswith(('127.', '10.')): + + print(f"DEBUG: Logged Skipped local IP {ip_address}") return try: