def view_course(request, degree, course): """Views the courses page""" if (degree not in ['biochemistry', 'mathematics', 'physics'] and course not in ['analysis_i', 'vector_analysis_i']): raise Http404 else: return render_response(request, 'courses/%s/%s/index.html' % (degree, course), {})
def view_course_chapter(request, degree, course, chapter): """Views the courses page""" return render_response(request, 'courses/%s/%s/%s.html' % (degree, course, chapter), {"chapter": chapter})
def viewHome(request): """Views the home page""" return render_response(request, 'home/home.html', {})
def viewDegrees(request, degree): """Views the degrees page""" if degree not in ['biochemistry', 'mathematics', 'physics']: raise Http404 else: return render_response(request, 'degrees/%s.html' % degree, {})
def view_about(request): """Views the about page""" return render_response(request, 'static/about.html', {})