In my view to get url parameters like this:
date=request.GET.get('date','')
In my url I am trying to pass parameters in this way with the url template tag like this:
<td><a href="{% url 'health:medication-record?date=01/01/2001' action='add' pk=entry.id %}" >Add To Log</a></td>
The parameter after the ? is obviously not working, how can I pass this data value in order to retrieve in with a get?
urls.py
usingpath()
e.g.path('client/<int:id>/')
. URL query parameters are the part of the url after the?
e.g.https://example.com/a/b/?param1=value1¶m2=value2
. This question is about url query parameters, but some of the answers refer to Django url parameters. – Christian Long