Hi my problem is that i want to distribute my django app to different users but i want it to package with a gui app say electron or tkinter. So when i run the gui app it also starts the django backend and shuts down on close.
kindly suggest me what will be the beat option to use for such a problem so i can distribute my django app with a gui app as installer
Question which you requested is not a recommended approach. Either you have to run you Django in your cloud or server to handle all this.
Still if you are looking for an option,I never tried this approach but hopefully it should work,
Step 1:
Place the Django & Tkinter application on same folder.
Step 2:
In your Tkinter application , when app is opening , you can have any .py file where you can have python manage.py runserver to start the Django server and grab the process id for the django server and store it
Step 3:
When you close the app, grab the process id which you stored in Step 2 , kill the process accordingly.
If you are using produciton based server like NGNIX, Apache then its pretty much same steps only I beleive.