This repository was archived by the owner on Sep 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 1212
1313
1414def get_client_ip (forwarded = None , remote = None ):
15-
16- if settings .DEBUG :
17- return '93.103.53.11'
18-
1915 if forwarded :
2016 return forwarded .split (',' )[0 ]
2117 return remote
Original file line number Diff line number Diff line change 4242 </ div >
4343 < div class ="clearfix ">
4444 < div id ="search-events-link ">
45- < a class ="btn btn-primary btn-lg "
46- href ="{% url 'web.search_events' %}?country_code={{ country.country_code }}&past={{ past }} ">
47- < i class ="fa fa-list "> </ i > List all events {% if country %}in
48- < span id ="country "> {{ country.country_name }}</ span > {% endif %}
49- </ a >
45+ {% if country.country_code %}
46+ < a class ="btn btn-primary btn-lg "
47+ href ="{% url 'web.search_events' %}?country_code={{ country.country_code }}&past={{ past }} ">
48+ < i class ="fa fa-list "> </ i > List all events < span id ="country "> {{ country.country_name }}</ span >
49+ </ a >
50+ {% else %}
51+ < a class ="btn btn-primary btn-lg " href ="{% url 'web.search_events' %} ">
52+ < i class ="fa fa-list "> </ i > List all events
53+ </ a >
54+ {% endif %}
5055 </ div >
5156 </ div >
5257
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def index(request):
5858 country = get_country_from_user_ip (user_ip )
5959
6060 try :
61- lan_lon = get_lat_lon_from_user_ip (user_ip )
61+ lan_lon = get_lat_lon_from_user_ip (user_ip ) or ( 58.08695 , 5.58121 )
6262 except GeoIPException :
6363 lan_lon = (58.08695 , 5.58121 )
6464
You can’t perform that action at this time.
0 commit comments