Answer the question
In order to leave comments, you need to log in
How to use Django in a third party application?
I recently started learning django, I really liked its implementation of models.
Now I'm trying to create such an application, on the front (CRUD / Admin / Statistics / etc ..) I want to use django, and in the backend (Permanently running application that works via api with other servers) I will use regular scripts.
And so I came to the conclusion that it would be very cool to use models to work with the database in the backend application, so to speak, one code.
Is it possible to somehow access working django models from a normal python script?
Or maybe I should choose another interaction?
Answer the question
In order to leave comments, you need to log in
Is it possible to somehow access working django models from a normal python script?
We have this: there are two applications in dzhanga - front and back. They are on different servers. From the front, you sometimes need to climb into the back database. Both projects under mercurial made a sub-repo, in which they put back models that need access from the front. When developing, we finish the backing, commit, go to the front code, pull up a new version of the subrep, embed, commit, release. Yes, from the front we go through .using () - we wrote a simple manager - and settings in settings for the remote database.
Not to say that a simple solution, but possible.
As an alternative, there was some kind of API (rpc, http) but it is more difficult to maintain, kmk.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question