Hi Thomas,
Thank you very much for your quick response. I think you understand my requirements. I'm basically trying to know what needs to be done in DRF implementation for developing a mobile app using Flutter when my website is still using existing UI and also without changing any functionality.
Best regards,
~Ram
~Ram
On Mon, Jul 18, 2022 at 6:47 PM Michael Thomas <michael.thomas.sw20@gmail.com> wrote:
Hey Ram,I'm afraid no one can answer your questions without knowing your code, how it works, or anything else...Broadly speaking, here's how we approached a similar scenario:1) Created one or more Serializer for each model that required interaction via API. Some models required more than one, as they were either too large for list() operations, or required a simpler representation when nested into another Serializer, etc..2) Created custom permissions to check if users were allowed to perform the action(s) they were trying to make3) Created ViewSets using the permissions and serializers mentioned above, as well as any additional actions that didn't fit within the normal REST verbs4) Created a router and registered the viewsets with it5) Added the router's urls into the projects url configurationI hope that's useful :)Kind Regards,Michael Thomas--On Tue, Jul 19, 2022 at 7:21 AM Ram <ram.mullapudi@gmail.com> wrote:--Hi,We completed coding all the features without DRF for our web site and now we are planning to develop a mobile app for the same website by keeping the web site as it is and develop a mobile app using Flutter.Based on our understanding, we have do the following in the current code for adding REST APIs
- We have to create serializers.py for each model in each App that we have
- We need to add a few lines of code in views.py
- We think we don't have to modify the UI template by using json response from DRF ( Is this really necessary because we are not changing anything in the website UI)
Please correct me if I'm wrong about the above 3 points or do we need to do any additional things?Best regards,
~Ram
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BOi5F2wgTLXQFreQp9cXNGBOnTqoAQ6vA5CqZuBNeya%2BWKLXg%40mail.gmail.com.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEdx1fo_Zk7H7nFMgUSYkfTC_p_cV8Qa8W17C_GHnDDwdk2eBw%40mail.gmail.com.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BOi5F2eVZbo4vj54XLErcEGbwU0%3DSawr-DQLj0H8Dej7J6NDQ%40mail.gmail.com.
No comments:
Post a Comment