コード例 #1
0
ファイル: views.py プロジェクト: mhallsmoore/AdScientia
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), {})
コード例 #2
0
ファイル: views.py プロジェクト: mhallsmoore/AdScientia
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})
コード例 #3
0
ファイル: views.py プロジェクト: mhallsmoore/AdScientia
def viewHome(request):
    """Views the home page"""  
    return render_response(request, 'home/home.html', {})
コード例 #4
0
ファイル: views.py プロジェクト: mhallsmoore/AdScientia
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, {})
コード例 #5
0
ファイル: views.py プロジェクト: mhallsmoore/AdScientia
def view_about(request):
    """Views the about page"""
    return render_response(request, 'static/about.html', {})