A
A
AleksandrOst2022-03-10 13:59:36
Django
AleksandrOst, 2022-03-10 13:59:36

Django + Vue cli 3 or Django REST framework what and when to use?

I decided to write an online store project in Django. There is little experience in development and I plan to present the project instead of commercial development experience in the portfolio.
As a result, the service should be obtained only for use in the browser (for now, I will limit myself to working in the browser).
I can not fully decide what exactly to use and what is the difference (in what cases what is used) between Django and Django REST framework and what is the role of Vue 3 ?
I see the following options:
1) Create an online store on Django. Use all the features of Django with minimal additions to jQuery or Vue templates (via script connection).
2) Create a separate project that will be responsible for the Back-end of the online store on the Django REST framework. And for the Front-end, create a separate project on Vue cli 3 that will completely render the site and make database queries on the Back-end.
Correct, add or suggest other options (using Python and Django as a basis)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2022-03-10
@AleksandrOst

Wow, what a mess in my head.
1. DRF is just a Django library. It provides handy (arguably) tools for reducing boilerplate code. They have a wagon and a small cart, but basically everyone uses only serializers . They have two disadvantages: they are monstrously slow and untyped. So I recommend looking at pydantic
2. When using Vue, you don't need jQuery or Django templates. From experience, Django templates are a very, very controversial thing. Now a lot of projects do not use them at all, preferring Vue or React or anything from the same opera.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question