C
C
candybooberr2016-09-17 03:48:17
Django
candybooberr, 2016-09-17 03:48:17

Django template or json by rest?

Good day.
Help me understand when to use django templates (for example, load a dozen model instances and render info about them), and when to send json and render on the client using the js framework.
Previously, I thought that it was necessary to make the server as thin as possible and the fat client.
Then I met with dynamic forms and did not look for js libraries, but simply used django forms to create / add objects.
Today I am writing a new project and I think that on the first render of the page I need to display a small collection and do it all with a django template, then operate with all the data using Rest.
Tell me please, how do I need to determine how to do better and at the same time not lose in performance?
Thank you all in advance for your kindness.
ZY on the client I will have angular.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mykola, 2016-09-17
@IKMOL

on Django only API, and the whole front on angular (templates, routes, ....).

S
sim3x, 2016-09-17
@sim3x

If teyu does not need to give rendered pages to search engines, then janga is only a restapy, angular renders the entire front

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question