Py2exe + Django is a bad idea.




A client asked me to build a program to track and store their production record. He didn’t want a web app and it had to run on Windows. Well, I first thought “Most of the stack I use is multiPlattaform and I have Py2exe to do the dirty job”. I was wrong.

I choose to use the Django ORM to store the information and a sqlite as a backend, so I didn’t have to set up anything client-side. It was the most logical solution because as I concern the Django ORM + some South is a kick-ass. It turned out that it is very hard to tell Py2exe to packege everything Django needs to work.

After a bit of try-error workflow I got a couple of windos being able to store some data. Now, it was time to think about the schema migrations, as the client ask for further and more advanced features in the future.

After hours of trying to get all off this in a  .exe fil,  I got nothing better than a “Unknown command: syncdb” from Django’s manage.py. I could only found this article talking about it and it is from 2008(!), which made it more frustrating.

I ended up calling SQKalchemy for help!

it made me remember why I like the “web plattaform” so much, because I use the stack I want, and I only switch if somethings is faster, cheaper or has a better documentation, no only because my clients use it. Sadly, you can’t change your client’s stack. Unless you are Steve Jobs.