I had this idea of creating desktop apps using django. The principe being: - Write the django app, and use something like cherrypy to serve it. - Write a Qt app in C++ to access it and this by using QtWebview (webkit)
I'd like to "bundle" this in a single app. The lighter, the better :)
So here are my questions and if you have better ideas and suggestions, please share them :)
Thanks a lot!
Not only JS folks can reuse web tehnologies for desktop applications we can do it too. If you want to create a nice gui and you want to reuse your web tech knowledge try flaskwebgui.
Compared to Electron and JavaScript, PyQt5 might not be the popular tool to build desktop apps, but it's very effective. Web apps are very popular, but there are still times when only a desktop app can deliver a great user experience.
Creating a desktop application by using Python is pretty simple. If you're a beginner you can select the basic level libraries for practice. You can also build real world advanced desktop applications by Python coding. In this article, you've learned the basics of how you can build desktop applications.
It is important to understand that a Django application is a set of code that interacts with various parts of the framework. There's no such thing as an Application object. However, there's a few places where Django needs to interact with installed applications, mainly for configuration and also for introspection.
Django has it's own server. Why involve CherryPy?
You're creating a hellaciously complex architecture for no recognizable purpose. Your comments are almost impossible to parse in the context of your question. Please consider rewriting the question to address your actual concerns with an actual thing you actually wrote.
"I ... used pywxiwdgets in the past and it was SLOW"
There are many of desktop frameworks. Use another one.
Don't introduce Django -- it's for web applications, not desktop applications. The overhead of messing with Django and CherryPy is silly.
Find the original reason for SLOW. I'll bet it was database slowness from using SQLite. If not that, I'll bet it was a poor data model. If not that I'll be it was poor use of the pywxwidgets. If not that, I'll bet your desktop app made internet connections that were slow. Indeed, I'd bet that almost any part of your app was the culprit and making a super-complex architecture will not make things faster, just more complex.
Until you identify -- and measure -- the original cause for slowness, you're not actually solving the actual problem you actually had.
Look at http://www.python-camelot.com/
It says "A python GUI framework on top of Sqlalchemy and PyQt, inspired by the Django admin interface."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With