Exemplo n.º 1
0
def addCourseResualt(request):

    tempNews = Course()
    tempNews.course_no = request.GET['course_no']
    tempNews.name = request.GET['name']
    tempNews.course_type = request.GET['course_type']
    tempNews.student_level = request.GET['student_level']
    tempNews.semester = request.GET['semester']
    tempNews.start_week = request.GET['start_week']
    tempNews.end_week = request.GET['end_week']
    tempNews.remarks = request.GET['remarks']
    tempNews.valid = 1
    tempNews.save()
    posts = tempNews.__class__.objects.all()
    t = loader.get_template('jiaoxuegongzuo.html')
    c = Context({'posts': posts})
    return HttpResponse(t.render(c))
Exemplo n.º 2
0
def addCourseResualt(request):
    
    tempNews=Course()
    tempNews.course_no= request.GET['course_no']
    tempNews.name= request.GET['name']
    tempNews.course_type= request.GET['course_type']
    tempNews.student_level= request.GET['student_level']
    tempNews.semester= request.GET['semester']
    tempNews.start_week= request.GET['start_week']
    tempNews.end_week= request.GET['end_week']
    tempNews.remarks= request.GET['remarks']
    tempNews.valid=1
    tempNews.save()
    posts = tempNews.__class__.objects.all()
    t =loader.get_template('jiaoxuegongzuo.html')
    c =Context({'posts':posts})
    return HttpResponse(t.render(c))