On Sep 5, 5:57 am, "Genis Pujol Hamelink" <[EMAIL PROTECTED]>
wrote:
> You can create a view like:
>
> @login_required
> def index(request):
>
>     if request.user.is_authenticated():
>         return HttpResponseRedirect('/go/here/')
>
>     else:
>         return render_to_response("go/loginpage")
>
> gr,
>
> G.
>
> 2008/9/5 Ken <[EMAIL PROTECTED]>
>
>
>
>
>
> > You have two options.
>
> > 1) You can write your own view.
>
> > 2) You can pass a GET parameter to the login view:
>
> > /accounts/login?next=/redirect/to/custom/path/
>
> > and put this in your form in the login template:
>
> > <input type='hidden' name='next' value='{{ next|escape }}' />
>
> > Cheers,
> > Ken
>
> > On Sep 5, 12:07 am, zissan <[EMAIL PROTECTED]> wrote:
> > > It's seemd that Django has set /accounts/profile as default page after
> > > login successfully.
> > > I wonder if we can re-direct it to a custom page?
>
> --
> Genís

I am having the same problem but when I put in
<input type='hidden' name='next' value='{{ next|timesheet }}' />
I still goes to account/profile
I can got to localhost:port/timesheet but this redirect is not.  any
idea what I am doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to