my urls.py setting is
path('somepath', views.somefunc.as_view(), name='SomeFunc')
SomeFunc takes POST and is supposed to take some query commands like
localhost:8000/path/to/somepath?a=f&b=g
When I print out the request itself, it seems like it's only reading POST /path/to/somepath?a=f and I cannot get anything from request.POST
How do I read both a and b?
This is Django2.0 by the way
EDIT:
I feel like I have some misunderstanding of the fundamental of django or even REST in general.
When I try to do a requests.post in python as I pass in the queries in the url, somehow those queries show up in request.GET on the django side.
My understanding has been that requests.post posts the data set in queries to django, so the queryset should show up in POST instead of GET
This seems like it's not the case. I wonder what I'm missing here.
using request.GET fixes everything..... but it's not really a fix so to speak
requests.post('localhost:8000/path/to/somepath', {'a': 'f', 'b': 'g'}), that dict would be sent as the body in form-encoded format and received inrequest.POST.