pass settings to api template

This commit is contained in:
j 2013-06-07 11:25:28 +02:00
parent 008654ad5d
commit 223ac3c534

View file

@ -22,8 +22,11 @@ def api(request):
for f in sorted(methods): for f in sorted(methods):
api.append({'name': f, api.append({'name': f,
'doc': actions.doc(f).replace('\n', '<br>\n')}) 'doc': actions.doc(f).replace('\n', '<br>\n')})
context = RequestContext(request, {'api': api, context = RequestContext(request, {
'sitename': settings.SITENAME}) 'api': api,
'settings': settings,
'sitename': settings.SITENAME
})
return render_to_response('api.html', context) return render_to_response('api.html', context)
action = request.POST['action'] action = request.POST['action']
version = getattr(request, 'version', None) version = getattr(request, 'version', None)