thelinuxer
thelinuxer

Reputation: 670

Compiling django project as a desktop application

I have a web application that I would like to have a version of it on the desktop. It would be totally awesome if i can just compile it rather than rewrite it. (I can't give the customer the code unfortunately)

I did some research and found some solutions to compile python in general. These solutions are:

That desktop application will run mainly on Windows, but if I can find a solution that would make it run on Linux and Mac too it would be great.

Did anyone manage to do this properly ? If so, can you please point me to the right direction?

Thanks.

Upvotes: 8

Views: 4431

Answers (1)

Kevin London
Kevin London

Reputation: 4728

Yes, I am doing this on OSX. It's not simple and, as far as I can tell, I may be the first person to successfully do it on OSX, so YMMV.

Pyinstaller, as of March, wasn't quite ready for Django support. I've filed a few tickets from when I tried to use it to package my application and I have admittedly not fixed those issues yet.

I went with py2app, ultimately, because I had prior experience with it for other applications. I made a sample project with py2app and Django and put it on Github. You may find it useful. I also linked a few of the pages that I found useful in the process, which I've included below:

https://groups.google.com/forum/?fromgroups=#!topic/django-users/-VGqvHew35g

http://misunderstandings.wordpress.com/2008/06/26/django-desktop-app/

https://bitbucket.org/Lawouach/cherrypy-recipes/src/9c35b4b62ef1/frameworks/django_?at=default

If I had to do it again, I would probably use SQLAlchemy and wxPython or PySide. I'd recommend thinking carefully about what you'd like to achieve using Django as a packaged application because it introduces a lot of complexity.

Upvotes: 2

Related Questions