python - Advice on structuring a growing Django project (Models & API) -


i’m working on improving django project used internally @ company. project growing i’m trying make design choices before it’s unmanageable refactor. right project has 2 important models rest of data in database supports each application in project added database through various separate etl processes. because of majority of data used in application queried in each view via sqlalchemy using straight multiline string , passing data through view via context param when rendering rather using django orm.

would there distinct advantage in building models tables populated via etl processes can start using django orm vs using sqlalchemy , query strings?

i think makes sense start building api rather passing gigantic amount of information through single view via context param, i’m unsure of how structure api. i’ve read people create entirely separate app named api , make views in return jsonresponse. i’ve read others same view based api include api.py file in each application in django project. others use django rest api framework, seems simple more complicated returning jsonresponse via view. there 1 place users interaction data database , portion of project uses django rest framework perform crud operations. being said:

which of these api structures typical, , gain/lose implementing jsonresponse views api vs using django rest framework?

thanks in advance resources or advice has regarding these questions. please let me know if can add additional context.

would there distinct advantage in building models tables populated via etl processes can start using django orm vs using sqlalchemy , query strings?

yes, centralized, consistent way of accessing data, , of course, 1 less dependency on project.

which of these api structures typical, , gain/lose implementing jsonresponse views api vs using django rest framework?

in general terms, json used data, , rest apis. mentioned django-rest in use, if there's tangible benefit having rest api, i'd go it


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -