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 at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to