2đź‘Ť
I’m not aware of any libraries to port a PyQT desktop app to a django webapp. Django certainly does nothing to enable this one way or another. I think, you’ll find that you have to rewrite it for the web. Django is a great framework and depending on the complexity of your app, it might not be too difficult. If you haven’t done much with web development, there is a lot to learn!
If it seemed like common sense to you that you should be able to run a desktop app as a webapp, consider this:
Almost all web communication that you likely encounter is done via HTTP. HTTP is a protocol for passing data between servers and clients (often, browsers). What this means is that any communication that takes place must be resolved into discrete chunks. Consider an example flow:
- You go to google in your browser.
- Your browser then hits a DNS server (or cache) that resolves the name google.com to some IP address.
- Cool, now your browser makes a request to that IP address and says “get me some stuff”.
- Google decides to send you back a minimal amount of HTML and lots of minified JavaScript in the page.
- Your browser realizes that there are some image links in the HTML and so it makes additional requests to google to get each of the images so that it can display them.
- Now all the content is loaded on your browser so it starts to execute the JavaScript code, and that code needs some more data from google so it starts sending requests to google too.
This is just a small example of how fundamentally different a web application operates than how a desktop application does. On a desktop app you have the added convenience that any operation doesn’t need to be “packaged up” and sent, then have an action taken, etc (unless you’re using a messaging architecture, but that’s relatively uncommon outside of enterprise apps).