From b5a16574b35939177b39315b761111b1b5bae679 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 27 Feb 2010 17:14:38 +0530 Subject: [PATCH] expose siteSettings --- pandora/app/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora/app/views.py b/pandora/app/views.py index 640d1dd50..6af3e2856 100644 --- a/pandora/app/views.py +++ b/pandora/app/views.py @@ -20,9 +20,11 @@ def api_getPage(request): return render_to_json_response(response) return render_to_response('site.js', context, mimetype="application/javascript") - def site_js(request): pages = models.Page.objects.all() - context = RequestContext(request, {'settings':settings, 'pages': pages}) + siteSettings = {} + for s in models.SiteSettings.objects.all(): + siteSettings[s.key] = s.value + context = RequestContext(request, {'settings':settings, 'pages': pages, 'siteSettings': siteSettings}) return render_to_response('site.js', context, mimetype="application/javascript")