views:

296

answers:

3

Hi guys, 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 :)

  • Is it possible to serve a django app with a c++ one? (a c++ server embedding python)?
  • anyone did this before? Do you have some articles, blog posts?

Thanks a lot!

A: 

Pyjamas Desktop can probably be integrated with Django. And there's no need for C++. It currently uses pywebkitgtk, but I don't think there's any real reason why it couldn't use PyQt4 instead with a bit of work.

Ignacio Vazquez-Abrams
A: 

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.

S.Lott
+1  A: 

Look at http://www.conceptive.be/projects/camelot/

It says "A python GUI framework on top of Sqlalchemy and PyQt, inspired by the Django admin interface."

dorian