from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
from movieapp.models import Student


def showMovie(request):
    '''
    网页显示
    :param request:
    :return:
    '''
    return render(request,'movie.html')


def do_showMovie(request):
    '''
    处理页面信息
    :param request:
    :return:
    '''
    sname = request.POST.get('sname')
    spwd = request.POST.get('spwd')
    if sname and spwd:
        stu = Student(sname = sname,spwd = spwd)
        stu.save()
        return HttpResponse('注册成功！')
    return HttpResponse('注册失败！')