reg/views.py
changeset 76 b0f5c8666edf
parent 62 b7e47cc39342
child 77 121a7aa78469
--- a/reg/views.py	Fri Apr 16 16:37:28 2010 +0530
+++ b/reg/views.py	Fri Apr 16 16:39:56 2010 +0530
@@ -35,7 +35,7 @@
 
     user = request.user
     if user.is_authenticated():
-        return redirect('/reg')
+        return redirect("/workshop/registration")
 
     if request.method == "POST":
         form = reg_forms.LoginForm(request.POST)
@@ -46,7 +46,7 @@
 
             new_user = authenticate(username=username, password=password)
             login(request, new_user)
-            return redirect('/reg')
+            return redirect("/workshop/registration")
         else:
             return render_to_response('login.html', {'user':user, 'form':form})
     else:
@@ -58,7 +58,7 @@
     """
 
     logout(request)
-    return redirect('/reg')
+    return redirect("/workshop/registration")
 
 def user_register(request, event_key):
     """ take the credentials like name, college and gender here itself.
@@ -114,7 +114,7 @@
 
     user = request.user
     if user.is_authenticated() and user.is_active:
-        return redirect('/reg')
+        return redirect("/workshop/registration")
 
     try:
         profile = Profile.objects.get(activation_key__iexact=activation_key)
@@ -144,7 +144,7 @@
         raise Http404
 
     if new_user.is_active:
-        return redirect('/reg')
+        return redirect("/workshop/registration")
     
     profile = new_user.get_profile()
     activation_key = profile.activation_key
@@ -216,7 +216,7 @@
 
     user = request.user
     if user.is_authenticated():
-        return redirect('/reg')
+        return redirect("/workshop/registration")
 
     if request.method == "POST":
         form = reg_forms.PasswordResetForm(request.POST)
@@ -359,7 +359,7 @@
 
     user = request.user
     if not ( user.is_authenticated() and user.is_active ):
-        return redirect('/reg')
+        return redirect("/workshop/registration")
 
     user_profile = user.get_profile()
     return render_to_response('view_profile.html', {'user':user, 'user_profile':user_profile})
@@ -370,7 +370,7 @@
 
     user = request.user
     if not ( user.is_authenticated() and user.is_active ):
-        return redirect('/reg')
+        return redirect("/workshop/registration")
 
     user_profile = user.get_profile()
 
@@ -416,10 +416,10 @@
     try:
         event = Event.objects.get(key__iexact=event_key)
     except Event.DoesNotExist:
-        return redirect('/reg')
+        return redirect("/workshop/registration")
 
     if not user in event.organizers.all() and user.is_active:
-        return redirect('/reg')
+        return redirect("/workshop/registration")
     
     profile = user.get_profile()
     return render_to_response('list_attendees.html', {'user':user, 'event':event, 'attendees':event.attendees.all()})