3 ms·
The section labelled "what I learned: it’s okay for an API to duplicate information" is something I come across often in Django projects. Django views send a Py
by amanzi 2y ago
The section labelled "what I learned: it’s okay for an API to duplicate information" is something I come across often in Django projects. Django views send a Python dictionary of data to the template processor to display the information. Often it's easier to massage the data into a more friendly format before sending it to the template, even if it means duplicating the info sent.
- cqqxo4zV46cp 2y agoYep. There’s certainly a balance to strike, especially on projects with a larger number of people working on them. But I generally find that you want to do at least MOST of your data processing outside of your template.