本文介绍了如何从Django Request对象访问url hash / fragment的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Django的请求对象?

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/

PS
假设片段部分发送到服务器(在我的具体情况下,因为它不是浏览器发送请求)。

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

推荐答案

按照定义,这不会发送到服务器。从:

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

这篇关于如何从Django Request对象访问url hash / fragment的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 15:04