Djangocon: Using Django in a desktop application - Thomas TurnerΒΆ

Tags: django, djangocon

(One of the summaries of a talk at the 2015 Djangocon EU conference).

Thomas Turner has been using Django for the last 7 years. His company Joinerysoft made a desktop app build on django for joineries (“window makers”).

What they use includes Python/Django. MFC, microsoft foundation classes. DHTMLx. ReportLab for PDF report generation. Firebird SQL database.

Why django? It is future proof. Easier to connect to the internet. And html pages are often more beautiful than standard microsoft dialogs.

A problem was securing the python and html code. They didn’t want customers to modify the templates, so they wrote their own template loader that could read encrypted templates. Same with python files. They shipped encrypted *.pyc files. For that, they needed to modify django a bit, because it looks for *.py extensions in various places.

As webserver, they settled on cherrypy which ran fast enough and could be integrated into c++.

As database, they picked Firebird as that one was easy to install and performed fine.

As a browser, they picked CEF (Chromium Embedded Framework), basically an embeddable version of Chrome. It is used by spotify, steam client, github for windows and adobe dreamweaver. You can embed it into a c++ application.

They needed a way to generate their own PDFs. So they picked Reportlab. They had to modify it and discovered that it is not well-coded. It looks like a C program and uses one-character variable names...

In the end he gave a demonstration. They did get it going. In reaction to questions: he wouldn’t do it this way again.

Photo from our 2014 cycling holiday
blog comments powered by Disqus
 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):