Profile image for Paul Webster Sweet Burlap
A Django-based Semantic Web Data Viewer needs to pass URIs as parameters.
Language
Python
Tags
"Query String" "Semantic Web" Django Python URI

Django Query String Parameters

1 #urls.py 2 (r'^get_uri/$', get_uri) 3 4 #views.py 5 def get_uri(request): 6 id = int request.GET.get('uri')

Discussion

Django places a rather strong emphasis on not using query strings in URLs if at all possible. However, I've been playing around with Semantic Web ideas recently, and I'm keen to try create a semantic web "viewer". ie. type the name of a thing into the app and it will return the rdf as html essentially - similar to Tabulator - http://www.w3.org/2005/ajar/tab.

Comments

Profile image for Paul Webster Sweet Burlap 2012-05-18

Unfortunately, directly inputting a URI such as http://127.0.0.1:8000/databrowse?uri=http://www... will result in the #i being spliced off (the resultant URI is references the actual document describing http://127.0.0.1:8000/databrowse?uri=http://www... (ie. the foaf:Person, known as Tim Berners Lee)

Profile image for Paul Webster Sweet Burlap 2012-05-18

I'd imagine that we either need to URI encode the URI (ie necessitating a forms rather than using the browser bar)
or alternatively, we should be able to get the hash URI using javascript