I am in the process of refactoring a Django web app. It is written in the usual MVT style, and I would like to change this for a REST + frontend approach. In my first iteration I would like to do as little changes as possible. My plan is:
- split backend into REST API and a simple, client facing Django application (the new "frontend")
- business logic in the REST API
- the Django "frontend" would talk to the REST API to perform operations and gather data
- REST API with Django REST Framework (DRF), keeping the current models and with little changes to the views.
- keep as much as possible of the Django templates for the frontend. That is, I do not want to introduce any new technology for the frontend (no Javascript SPA framework ala AngularJs, EmberJs or React)
Later iterationns of the refactoring would probably move to a React SPA backed by the DRF application.
Is it possible to have a Django "frontend" talk to a REST api?