@login_required(login_url='/landpage')
def lecture_modal(request, course_id):
    if request.method == u'POST':
        # Get the lecture_id of post and either create a brand new form
        # for the user, or load up existing one based on the database
        # data for the particular lecture.
        lecture_id = int(request.POST['lecture_id'])
        form = None
        if lecture_id > 0:
            lecture = Lecture.objects.get(lecture_id=lecture_id)
            form = LectureForm(instance=lecture)
        else:
            form = LectureForm()
        return render(request, 'teacher/lecture/modal.html',{
            'form' : form,
        })
dataset/ETHPy150Open AcademicsToday/py-academicstoday/academicstoday_project/teacher/views/lecture.py/lecture_modal/original