sdi/views.py
branchanoop
changeset 97 bf16c82df506
parent 95 ab554d46fd34
child 98 e6140a4cac5d
equal deleted inserted replaced
96:8cccb8f7fff2 97:bf16c82df506
     1 from django.shortcuts import render_to_response, redirect
     1 from django.shortcuts import render_to_response, redirect
     2 from django.http import HttpResponse
     2 from django.http import HttpResponse
     3 from django.contrib.auth.decorators import login_required
     3 from django.contrib.auth.decorators import login_required
       
     4 from django.utils.datastructures import MultiValueDictKeyError
     4 
     5 
     5 from django.contrib.auth import authenticate, login, logout
     6 from django.contrib.auth import authenticate, login, logout
     6 
     7 
     7 from sage_days.sdi.models import Registrant
     8 from sage_days.sdi.models import Registrant
     8 from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm, UserSelectForm
     9 from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm, UserSelectForm
   141         except Registrant.DoesNotExist:
   142         except Registrant.DoesNotExist:
   142             raise Http404
   143             raise Http404
   143 
   144 
   144         return render_to_response("cnf_wsp_ptc.html", {"email":email})
   145         return render_to_response("cnf_wsp_ptc.html", {"email":email})
   145 
   146 
   146 
       
   147 def admin_login(request):
   147 def admin_login(request):
   148     """ basic login.
   148     """ basic login.
   149     """
   149     """
   150 
   150 
   151     redirect_url = "/%s/registration/stats"%aup
   151     redirect_url = "/%s/registration/stats"%aup