Hello Danfi! There is a syntax mistake. I changed the &pag={{num_pag}} by ? pag={{num_pag}} and the problem was solved. One thing to point out is that there is a method with the HttpRequest objects called get_full_path() that returns the URL with the params. I used it inside a session to track the user, this way I avoid having to pass data from one pag. to another.
I do not know what happens with data submitted by get which contains accents. Are there any problems? On 21 mayo, 10:33, Danfi <tda...@gmail.com> wrote: > maybe you lack of "?"before {{slug_plataform}} > > <p><a href="/plataforms/?{{slug_plataform}} > &pag={{num_pag}}"class="link">Return to list</a></p> > > On 5月20日, 上午10时25分, Caumons <caum...@gmail.com> wrote: > > > > > Hi everybody. > > > I am having problems with the urlencoding. I explain. In a template I > > have the following code: > > > <p><a href="/plataforms/{{slug_plataform}}&pag={{num_pag}}" > > class="link">Return to list</a></p> > > > In the view I pass the variables slug_platform and num_pag to the > > template, but the problem is that when I click the link it brings me > > to the following page (copy/paste from the developing server): > > > /plataforms/wii%26pag%3D1/ HTTP/1.1" 404 1738 > > > As you can see there are these % symbols and I do not know if Django > > does an automatic urlencoding, but then the URL does not match with > > any pattern because of these symbols! But if I test the code with an > > html validator it gives me errors because it says that this line is > > not urlencoded. > > > I have also tried doing this: > > <p><a href={{"/plataforms/{{slug_plataform}}&pag={{num_pag}}"| > > urlencode}} class="link">Return to list</a></p> > > but this raises a syntax error in the template > > > I do not know what to do and I also do not know if when we do > > something like request.get["something"] you have to unquote it or it > > is not needed. > > > Thank you so much. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.