# in django URL

18 views
Skip to first unread message

Domagoj Kovač

unread,
Aug 14, 2014, 6:01:00 AM8/14/14
to django...@googlegroups.com
Hi Guys, 

where file_path is path to the file

both
requestGET["file_path"] and
request.get_full_path()

ignore #1/test.txt part, how can i fix this? Is there some other way to get full url?

Drew Ferguson

unread,
Aug 14, 2014, 6:26:20 AM8/14/14
to django...@googlegroups.com
Hi

The hash mark has a special meaning in URIs; this is not specific to
Django

If you must use it in an actual URL, it needs to be escaped as %23

The urlencode template tag might help

https://docs.djangoproject.com/en/dev/ref/templates/builtins/#urlencode

Notice that this URL uses a hash mark as intended to reference an anchor
in the HTML page
--
Drew Ferguson

Reply all
Reply to author
Forward
0 new messages