views:

451

answers:

1

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

+4  A: 

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

Matthew Flaschen
This is true, but in my specific case the fragment part is sent to the server (I see it from the apache log).It's a strange situation, but I know that HTTP requests to that URL will include the fragment part. (It's not a browser to send the request).So how (if possible) can I access it?
Andrea Zilio
Matthew Flaschen
With high probability the node sending the request to that url is in fact using CURL and so your comment is really helpful!Knowing that CURL has been fixed to not send the fragment anymore is very important and will make me reconsider my approach. Thanks ;)
Andrea Zilio