how to Select data from django tables and insert them to an another external database in use?
If you want to start the process via a button, I would recommend that you use Aayush's code within a django view that is called by your button. If the transfer takes too much time to wait for the site to refresh afterwarda, you can call the view via ajax or you can call the script as a parallel process via the view.
i have some data in Django database and i want to select them and copy them to an other external database in use  the structure of tables in Django database and in external database is same
i hope find any help please for make this logic ,thank you