forked from 0x2620/pandora
expose siteSettings
This commit is contained in:
parent
2e8676fc52
commit
b5a16574b3
1 changed files with 4 additions and 2 deletions
|
@ -20,9 +20,11 @@ def api_getPage(request):
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
|
|
||||||
return render_to_response('site.js', context, mimetype="application/javascript")
|
return render_to_response('site.js', context, mimetype="application/javascript")
|
||||||
|
|
||||||
|
|
||||||
def site_js(request):
|
def site_js(request):
|
||||||
pages = models.Page.objects.all()
|
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")
|
return render_to_response('site.js', context, mimetype="application/javascript")
|
||||||
|
|
Loading…
Reference in a new issue