summaryrefslogtreecommitdiff
path: root/apps/blog
diff options
context:
space:
mode:
Diffstat (limited to 'apps/blog')
-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')