From e1a28c941aa1f64d7504ab87a1c5c23b5a0206ad Mon Sep 17 00:00:00 2001 From: j Date: Fri, 5 Apr 2024 21:20:15 +0100 Subject: [PATCH] fix country fallback --- pandora/user/urls.py | 12 ------------ pandora/user/utils.py | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 pandora/user/urls.py diff --git a/pandora/user/urls.py b/pandora/user/urls.py deleted file mode 100644 index 429e1da90..000000000 --- a/pandora/user/urls.py +++ /dev/null @@ -1,12 +0,0 @@ -# -*- coding: utf-8 -*- - -from django.conf.urls.defaults import * - - -urlpatterns = patterns("user.views", - (r'^preferences', 'preferences'), - (r'^login', 'login'), - (r'^logout', 'logout'), - (r'^register', 'register'), -) - diff --git a/pandora/user/utils.py b/pandora/user/utils.py index 5328a4646..db557dfef 100644 --- a/pandora/user/utils.py +++ b/pandora/user/utils.py @@ -24,7 +24,7 @@ def get_location(ip): location = g.city(ip) except: try: - location = g.country(s.ip) + location = g.country(ip) except: location = None if location: