Reputation: 3832
Let's say I want the following url to get matched with a django view through urls.py
: www.mysite.com/cake/#vanilla
In urls.py
I have something like this:
url('^cake/#.*/$', app.views.view ),
So basically I want all urls that start with root: www.mysite.com/cake/#
, to be handled by this view. However, django urls seems to treats # as %23, so instead all urls with root www.mysite.com/cake/%23
is handled by that view. How can I get the hash sign in url('^cake/#.*/$', app.views.view )
, to be treated like an actual hash sign instead of a %23?
Thanks for any help!
Upvotes: 6
Views: 6295
Reputation: 33420
You need to force your users to use IE7 from winetricks. It's the only browser that has the bug of sending the hash and stuff in the HTTP request :)
If it has been fixed, then you need to force your users to use IE7 from winetricks of last year's version.
As Adam stated, browsers should not send the hash part to the server. Using the hash in the url is common for websites like deezer because it lets the user navigate without reloading the page (all navigation is handled in javascript). This allows navigation without interuption/reload of the music player which is in flash.
If you want to enable hash browsing, then you can use a plugin like: http://tkyk.github.com/jquery-history-plugin/
Upvotes: 3