Commit 1f2251c9 by pmitros

Making 6.002 page main, moving static pages into static page framework

parent 55c10212
...@@ -5,12 +5,16 @@ ...@@ -5,12 +5,16 @@
from djangomako.shortcuts import render_to_response, render_to_string from djangomako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect from django.shortcuts import redirect
from django.core.context_processors import csrf
valid_templates=['index.html', 'staff.html', 'info.html', 'credits.html'] #valid_templates=['index.html', 'staff.html', 'info.html', 'credits.html']
valid_templates=['mitx_global.html', 'index.html']
def index(request, template): def index(request, template):
csrf_token = csrf(request)['csrf_token']
if template in valid_templates: if template in valid_templates:
return render_to_response(template,{}) return render_to_response(template, {'error' : '',
'csrf': csrf_token })
else: else:
return redirect('/') return redirect('/')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment