1👍
✅
try using url as:
url(r'^/location/',your_view,name='swidget')
When you use GET parametes like www.host.com/end_point/?message=value&something=value2
you don’t have to set them in the url, instead just use url(r'^/end_point/, some_view)
and view like
def your_view(request):
mobilenumber = request.GET['mobilenumber']
message = request.GET['message']
receivedon = request.GET['receivedon']
# Do what you need
Hope it helps
0👍
Just write a view for the path /location
, and inside the view use the request.GET
dictionary to see the parameters in the URL:
def location_view(request):
mobilenumber = request.GET['mobilenumber']
...
- [Answer]-Django raise forms.ValiadationError not displaying
- [Answer]-Python, Django – private media streaming and prevent hijacking
Source:stackexchange.com