How to run django backend with Any GUI framework

Submitted 3 years, 5 months ago
Ticket #286
Views 265
Language/Framework Django
Priority Medium
Status Closed

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 

Submitted on Nov 10, 20

so you want to distribute the Desktop + Django app in same package? - Vengat 3 years, 5 months ago

@nikil , you need to comment to the techions answer if you have any question or doubt, kindly delete the comment which you have given in answer. Otherwise, I will request to delete your comment - Vengat 3 years, 5 months ago
add a comment

1 Answer

Verified

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.

Submitted 3 years, 5 months ago

Can you update us the status of the ticket?

- Vengat 3 years, 5 months ago


Latest Blogs