How to access url hash/fragment from a Django Request object

烂漫一生 提交于 2019-11-29 05:30:30

问题


As in the title: how can I access the url hash/fragment (the part following the dash #) from a Django view and so, I suppose, from a Django Request object?

I've not found enough information on the documentation here available: http://docs.djangoproject.com/en/dev/ref/request-response/

P.S. Suppose that the fragment part is sent to the server (it is so in my specific case since it's not a browser to send the request).


回答1:


This is not sent to the server, by definition. From URI References: Fragment Identifiers on URIs :

"The HTTP engine cannot make any assumptions about it. The server is not even given it."



来源:https://stackoverflow.com/questions/2181186/how-to-access-url-hash-fragment-from-a-django-request-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!