Files
edx-platform/static_template_view/views.py
Piotr Mitros 07454b82b2 Factored out a couple of modules
--HG--
rename : courseware/static/schematic.js => courseware/static/js/schematic.js
2011-12-16 15:51:10 -05:00

16 lines
470 B
Python

# View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
# security reasons.
from djangomako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
valid_templates=['index.html', 'staff.html', 'info.html', 'credits.html']
def index(request, template):
if template in valid_templates:
return render_to_response(template,{})
else:
return redirect('/')