How to access url hash/fragment from a Django Requ

2019-02-04 04:26发布

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条回答
地球回转人心会变
2楼-- · 2019-02-04 04:35

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."

查看更多
登录 后发表回答