Can Django be used with py2exe?
We'd like to create a Django Intranet application for mass market. We only need to support Windows users, and it needs to be very easy for a Windows admin (or "technical user") to deploy (baring in mind开发者_运维知识库 that most Windows admins/users have little experience with Python, etc).
Is Django + py2exe the answer? Do we need something extra, or something else?
Yes, you require:
- Python 2.5.2
- Django (svn version at least 2008-06-05)
- CherryPy (web server)
- Py2Exe
Tutorial
PyInstaller has builtin support for Django applications. It will do most of the magic by itself.
I recently did this with Django 1.5 and python 2.7. I didn't embed a webserver, because I really just wanted the ORM.
Here are the options I used in setup.py:
options = {
"py2exe":{
"includes": ["Cookie","htmlentitydefs"],
"packages":["django","sqlite3","email"],
}
}
精彩评论