python - processing urls with hashes like jsbin -


jsbin, on browsers not support (window.history && window.history.pushstate) modify url via window.location.hash = data.edit; (details here).

this creates urls

http://jsbin.com/#/imetor/1/edit 

how django's urls.py process url that? i not sure hash being sent server. if not being sent server, technique jsbin uses pass parameters server?

fwiw, not work:

url(r'^#/(?p<project_id>[0-9a-za-z]{6,})', 'mysite.views.project_hash', name='project_hash'), 

you right. part past # not sent server.

in django, if want see url sent server, can

print request.get_full_path() 

in case of jsbin, server returns page contains javascript code reads url params , executes code personalize page. example of javascript code parses url , executes function backbone.router (http://backbonejs.org/#router).


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -