1๐
โ
If you want to use Django ORM ( means you are using a Django in somewhere in the app), then the approaches you are given is ok and acceptable.
But if all you want is an ORM, then why not try a PHP one like this ?
Betterway for two tech
s can communicate is using any IPC mechanisms like Process/TCP/Http direct (or RPC).
or
$command = "python manage.py storedata" // custom manage command
$output = shell_exec($command); // or $output = `python manage.py storedata`
But keeping two codebases, in future will become unmaintainable, so use any PHP native solution.
Source:stackexchange.com