O
O
Oleg Kotov2019-07-16 14:57:33
Django
Oleg Kotov, 2019-07-16 14:57:33

How to organize a project in Django + DRF?

I wondered how to organize the project structure on Django + React through DRF.
That is, what and where to put in folders.
Keep everything related to DRF in one place? Or scatter through django application folders?
Also, during the search, the question arose: "Should I use React + DRF for JSON and processing, or use Django templates + .js render? (I tend to the first)"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilyas, 2019-07-17
@AgeofCreations

Definitely, when linking django + drf + react, you should not use rendering templates from django, django + drf is needed here only for organizing the REST API.
According to the project structure, I adhere to something like this:

backend
    apps
    requirements
    django_app_name
        settings.py
        urls.py
        wsgi.py
    manage.py
frontend
    node_modules
    public
    src
    package-lock.json
    package.json

and when the project is launched, these are different containers for the frontend and backend, which are in the same network

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question