forked from 0x2620/pandora
fix country fallback
This commit is contained in:
parent
c55c733bcd
commit
e1a28c941a
2 changed files with 1 additions and 13 deletions
|
@ -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'),
|
||||
)
|
||||
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue