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?
Barely never seen it, which means
can’t
, otherwise why is it calledDjango ORM
If you like independent, you should try
SQLAlchemy
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).