summaryrefslogtreecommitdiff
path: root/apps/blog/signals.py
diff options
context:
space:
mode:
authorluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2010-06-13 01:18:25 +0000
committerluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2010-06-13 01:18:25 +0000
commitc5a6d45415c7601f9a515d05a61ee795dc37536b (patch)
treec120b44a9cc0eea9ec69a1817053f97b22e66856 /apps/blog/signals.py
parent6657ae24658383a9841450329a518327638651c0 (diff)
updated maps.html to use google maps v3 and created custom route model using gmaps polyline tools to encode points
Diffstat (limited to 'apps/blog/signals.py')
-rw-r--r--apps/blog/signals.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/blog/signals.py b/apps/blog/signals.py
index 9809f6f..23e6d3f 100644
--- a/apps/blog/signals.py
+++ b/apps/blog/signals.py
@@ -3,7 +3,7 @@ from django.conf import settings
from django.template import Context
from django.db.models import get_model
-from locations.models import Region,Country
+from locations.models import Region,Country,Route
def update_recent(sender, instance, signal, *args, **kwargs):
# Update recent entries static file
@@ -20,13 +20,14 @@ def update_recent(sender, instance, signal, *args, **kwargs):
qs = model.objects.filter(status__exact=1)
cl = Country.objects.filter(visited=True).exclude(name='default')
rl = Region.objects.all()
- c = Context({'object_list':qs, 'country_list':cl,'region_list':rl})
+ rtl = Route.objects.all()
+ c = Context({'object_list':qs, 'country_list':cl,'region_list':rl, 'route_list':rtl})
t = render_to_string('includes/map_entry_list_template.html',c)
- fpath = '%s%s' %(settings.PROJ_ROOT,'templates/includes/map_entry_list.html')
+ fpath = '%s%s' %(settings.PROJ_ROOT,'media/js/mainmap.js')
file = codecs.open(fpath, 'w','utf8')
file.write(t)
file.close()
- c = Context({'country_list':cl,'region_list':rl})
+ c = Context({'country_list':cl,'region_list':rl,'route_list':rtl})
t = render_to_string('includes/map_sidebar_template.html',c)
fpath = '%s%s' %(settings.PROJ_ROOT,'templates/includes/map_sidebar.html')
file = codecs.open(fpath, 'w','utf8')