Example #1
0
 def post(self, request):
     form = loginForm(request.POST)
     if not form.is_valid():
         return render(request, 'minivideo/login.html', {'form':form})
     request.session['stuno'] = request.POST['team_captain_stuno']
     request.session.set_expiry(0)
     return HttpResponseRedirect(reverse('minivideo:resource_list'))
Example #2
0
 def post(self, request):
     form = loginForm(request.POST)
     if not form.is_valid():
         return render(request, 'minivideo/login.html', {'form': form})
     request.session['stuno'] = request.POST['team_captain_stuno']
     request.session.set_expiry(0)
     return HttpResponseRedirect(reverse('minivideo:resource_list'))
Example #3
0
 def get(self, request):
     if 'stuno' in request.session:
         return HttpResponseRedirect(reverse('minivideo:resource_list'))
     form = loginForm()
     return render(request,'minivideo/login.html',{'form':form})
Example #4
0
 def get(self, request):
     if 'stuno' in request.session:
         return HttpResponseRedirect(reverse('minivideo:resource_list'))
     form = loginForm()
     return render(request, 'minivideo/login.html', {'form': form})