Re: Need help regarding url patterns
Hi.
Thanks for replying.
The reason I used login/logout multiple times in the urls.py because
i was unable to redirect from polls/03/logout to polls/login. When I
am using href="../logout" , it works but sometimes when I am in
level-2 in doesnt work.
Please ignore the parameters of poll id in login/logout. Its just that
I was trying something and forgot to remove the code.
Now I went through reverse thing. I didnt get an idea about how do I
redirect from a logout link in any page to polls/logout and also the
url in the address bar should change. Please help me out.
On Feb 3, 12:06 am, akaariai <akaar...@gmail.com> wrote:
> On Feb 2, 4:57 pm, ankitrocks <aapkaankit...@gmail.com> wrote:
>
> > Please take a look at the following files:
>
> >http://pastebin.com/F86G9XJn
>
> >http://pastebin.com/p6gArpuG
>
> >http://pastebin.com/zxNHVHbV
>
> >http://pastebin.com/Rf9Kg9jf
>
> > Now my problem is that, I want all the logout links in the templates
> > point to polls/login and this change should also be reflected in the
> > url on my address bar. Same holds for home link which should point to
> > polls/welcome .
>
> Two quick pointers:
> - You probably want to use the reverse method and the url template
> tag. Django documentation will tell you more about these.
> - Why does the login/logout views take optional poll_id argument
> which is then not used. You should have the login and logout views
> only once defined in your urls.py, that is, not also under /id/login.
>
> - Anssi
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home