# HG changeset patch # User nishanth # Date 1271416196 -19800 # Node ID b0f5c8666edf7f9157d975485a70959e0e925e3c # Parent bda9ee536063d6d8b920355322af3f84c1ca52fc changed the redirect path to new home page everywhere. diff -r bda9ee536063 -r b0f5c8666edf reg/views.py --- 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()})