[Fixed]-Unable to pass data inside anchor tag to views in Django

1👍

For queries you can use $ at the end of the url:

url(r'^doc_viewer/$', views.doc_viewer, name="doc_viewer"),
url(r'^$', views.index)

Also it is better to add index at the end (because ^$ can match most of the urls and make them broken).

Also query name should be same with request.GET.get() function’s parameter, you used query_name in html and project_name in view function.

Leave a comment