search

Home  >  Q&A  >  body text

python - Can Django's ORM be used independently? For example, when used in non-web programs

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?

代言代言2740 days ago979

reply all(2)I'll reply

  • 三叔

    三叔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

    reply
    0
  • phpcn_u1582

    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).

    reply
    0
  • Cancelreply