Re: How to talk to API via HTTP on Django

2019-06-25 Thread Yoo
Use Django REST Framework and django-filters. Easy set-up. 
For something you're trying to do, you can send a request like: 
http://127.0.0.1:8000/api/testtable/?format=json=science/
Basically, this goes to the table Testtable, filters the queryset by some 
column category that returns all categories of science. The returned data 
would be in the form of json.

You can also do http://127.0.0.1:8000/api/?category=science=1/

That'll filter by multiple columns. It's kinda like 
Testtable.objects.filter(category='science', user=1)

If you're doing something with username and password, use headers. If it's 
something for mobile, try using JWTAuthentication. 

On Tuesday, June 25, 2019 at 6:31:11 PM UTC-4, Dejan Batic wrote:
>
> I'm newbie of course. I have this API documentation and I'm trying to 
> figure out how to make this http request works. 
>
> For example here is the reques that client sends:
>
> GET 
> {URL}/api/{USER}:{PASS}/plaint/play_create*{PARAM1}*{SEQUENCE}*{GROUP}*{PARAM2}
>
> That line is from client and the server is a Django with a database (MySQL 
> or PostgreSQL).
>
> I want to know how to make this http requ
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/eb402d53-8ab0-40ef-81b3-a772f776e290%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to talk to API via HTTP on Django

2019-06-25 Thread Dejan Batic
I'm newbie of course. I have this API documentation and I'm trying to 
figure out how to make this http request works. 

For example here is the reques that client sends:

GET 
{URL}/api/{USER}:{PASS}/plaint/play_create*{PARAM1}*{SEQUENCE}*{GROUP}*{PARAM2}

That line is from client and the server is a Django with a database (MySQL 
or PostgreSQL).

I want to know how to make this http requ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/73901d89-d1dd-408c-9f64-ad84f871782b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.