Discussion:
How to catch the data send by the app?
Sagar Bhadarka
2018-08-08 11:50:28 UTC
Permalink
Hello everyone
I have an API in django. When that API called by app it accept some data
from the app. For example...
Suppose user commented on some post and I want that API accept that comment
and the app also send user name with the comment so I can store it with
that username and later we can found who gave that comment. But I don't
know how to do that using generic views. I saw few examples but they used
normal functions. Can I do that with generic views?
Even I want to know that if user want to update some info then API will
accept that info and username so it can update info of that user. If there
is a way to do that with generic view then let me know. Let me know which
is the better way, generic view or normal functions?
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jakob Damgaard Møller
2018-08-08 14:02:43 UTC
Permalink
Hello sagar, i think this tutorial can help you. See this
http://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/#associating-snippets-with-users
Post by Sagar Bhadarka
Hello everyone
I have an API in django. When that API called by app it accept some data
from the app. For example...
Suppose user commented on some post and I want that API accept that
comment and the app also send user name with the comment so I can store it
with that username and later we can found who gave that comment. But I
don't know how to do that using generic views. I saw few examples but they
used normal functions. Can I do that with generic views?
Even I want to know that if user want to update some info then API will
accept that info and username so it can update info of that user. If there
is a way to do that with generic view then let me know. Let me know which
is the better way, generic view or normal functions?
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...