Dear Django masters, can I ask if Django's ORM can be used independently? For example, when using
in non-web programs, I personally feel that Django's ORM is very convenient, and it also improves the readability of the code a lot. But I am currently using Django’s ORM in other programs. Is it possible and how to implement it?
三叔2017-07-05 10:36:18
Barely never seen it, which means can’t
, otherwise why is it called Django ORM
If you like independent, you should try SQLAlchemy
phpcn_u15822017-07-05 10:36:18
Django itself is based on MTV (model-template-view) architecture.
Of course you can choose not to use model or template.
For example: for database operations, you can use native sql statements instead of models; the front end can also be completely independent, and all interactions are implemented through ajax (API).