Django - urls.py - Filenames with a hash/pound (#) sign?

Posted by miya on Stack Overflow See other posts from Stack Overflow or by miya
Published on 2010-04-04T07:04:51Z Indexed on 2010/04/04 7:13 UTC
Read the original article Hit count: 235

Filed under:
|
|

I'm using django and realized that when the filename that the user wants to access (let's say a photo) has the pound sign, the entry in the url.py does not match.

Any ideas?

    url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root':
    MEDIA_ROOT},

it just says:

"/home/user/project/static/upload/images/hello" does not exist

when actually the name of the file is:

hello#world.jpg

Thanks, Nico

© Stack Overflow or respective owner

Related posts about django

Related posts about python