Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find out the anchor in the URI in Pyramid?

Simply put, in Pyramid, when someone requests a page e.g.:

/foo/#bar

How do I find out what the anchor is? In this case, it would be bar. This seems like it should be trivial, but I'm not sure how to retrieve this information in Pyramid.

request.current_route_path(), request.url and request.path would only return /foo/ in this scenario.

(Is Pyramid actually left completely unaware of this? Maybe servers simply never receive this information and I've never realised that 'til now)

like image 913
doppelgreener Avatar asked Aug 13 '12 03:08

doppelgreener


1 Answers

The fragment is never sent to the server by the client; you will need to use JavaScript to process it on the client side.

like image 142
Ignacio Vazquez-Abrams Avatar answered Sep 28 '22 07:09

Ignacio Vazquez-Abrams