Why do we need Django rest framework when our conventional django do what we want?

84 views
Skip to first unread message

Joseph Bashorun

unread,
Jul 31, 2022, 10:24:17 AM7/31/22
to Django users

I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for it?

Lakshyaraj Dash

unread,
Jul 31, 2022, 10:31:12 AM7/31/22
to django...@googlegroups.com
You need drf aka DjangoRestFramework because it provides a smooth api for your application. It comes into use whenever you're trying to have a javascript framework like ReactJS or NextJS or Angular or VueJS etc... On the client side. If you inject js framework in the frontend you also need a package called django-cors-headers.

You can also use drf with django if you don't have any js frameworks in the client side. In this case you don't need a cors headers package.

Thanks and Regards
Lakshyaraj Dash

On Sun, Jul 31, 2022, 19:53 Joseph Bashorun <josephb...@gmail.com> wrote:

I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for it?

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e45680e6-7c40-4ff4-985b-6cdc31a59e29n%40googlegroups.com.

Ram

unread,
Jul 31, 2022, 6:02:40 PM7/31/22
to django...@googlegroups.com
Hi,

In my opinion if you are starting from scratch to develop your ecommerce application, I would encourage you to start with DRF, but if in case if you can not afford to write DRF APIs for an existing application, you might want to refer this:


Disclaimer: I can not give any guarantee on this article because we did not try this. In fact I would like to hear comments from other experts here about this article?

Best regards,
~Ram



Julio Cojom

unread,
Jul 31, 2022, 6:20:51 PM7/31/22
to django...@googlegroups.com

There are a couple of projects built in Django for this, for example Django-Oscar or saleor(community version), the last one is a tech stack a little bigger but really fast and customizable.

If you want to start one from scratch, be sure to check both projects as they have good abstraction classes.

Regards



Adebileje Nurudeen

unread,
Jul 31, 2022, 8:30:50 PM7/31/22
to django...@googlegroups.com
Sure... You need it

On Sun, Jul 31, 2022, 3:24 PM Joseph Bashorun <josephb...@gmail.com> wrote:

I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for it?

Abdul Qoyyuum

unread,
Jul 31, 2022, 9:48:30 PM7/31/22
to Django users
It really depends on your usecase. If you find that you can work without an API for your ecommerce website, then you don't need it. If you believe you need to make your ecommerce as a headless ecommerce site, then you need an API or GraphQL or other means of sharing data.

Ryan Nowakowski

unread,
Aug 25, 2022, 11:19:23 PM8/25/22
to Django users
On Sun, Jul 31, 2022 at 12:55:46AM -0700, Joseph Bashorun wrote:
> I am stuck in a loop of confusion. I am trying to build an ecommerce
> website and make it production ready. Do i need to build an API for it?

No https://twitter.com/htmx_org/status/1561808410856898561

Paul serubombwe

unread,
Aug 26, 2022, 5:57:58 AM8/26/22
to Django users

Its a requirement if your application is using 1. a fronted framework,
2. If your going to integrate APIs for instance payment APIs etc. And its also good in authentication.

--
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/20220826031841.GG7295%40fattuba.com.

Vj Vijay

unread,
Aug 26, 2022, 9:41:33 AM8/26/22
to django...@googlegroups.com
Api can make your website versatile....what I mean by that is that your website can communicate with all type of users easily with the help of API almost most of the production ready applications  front end and backend are built seperately so you need API to communicate 

--
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...@googlegroups.com.

ADAMSON BELLO

unread,
Aug 26, 2022, 9:41:33 AM8/26/22
to django...@googlegroups.com
You need the Django rest api framework if your app would be distributed through many chanels.

Le ven. 26 août 2022 à 05:57, Paul serubombwe <bradi...@gmail.com> a écrit :

Its a requirement if your application is using 1. a fronted framework,
2. If your going to integrate APIs for instance payment APIs etc. And its also good in authentication.

On Aug 26, 2022 6:19 AM, "Ryan Nowakowski" <tub...@fattuba.com> wrote:
On Sun, Jul 31, 2022 at 12:55:46AM -0700, Joseph Bashorun wrote:
> I am stuck in a loop of confusion. I am trying to build an ecommerce
> website and make it production ready. Do i need to build an API for it?

No   https://twitter.com/htmx_org/status/1561808410856898561

--
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...@googlegroups.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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJkmis1qXdtxEJz63O_a5cSwy00UZawxo4E9RukJrd8D8aeBJw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages