Идём читаем внимательно. Я сказал внимательно!!!
Далее в setup.py
from distutils.core import setup
import py2exe
setup(console=[{'script' : 'boost.py', 'icon_resources':[(0x0001, 'popcorn.ico')]}],
options={'py2exe' : {'includes' : ['sip'],
'excludes' : [
'pywin',
'pywin.debugger',
'pywin.debugger.dbgcon',
'pywin.dialogs',
'pywin.dialogs.list',
'Tkconstants',
'Tkinter',
'tcl',
],
'packages': ['django', 'email', 'PIL', 'my_app'],
}})
my_app - наш проект.
urls.py (почему то в settings.py не заработал, пришлось прописывать прямо в файле):
from django.conf.urls.defaults import *
import os
CURRENT_DIR = os.path.dirname(__file__)
OUTSIDE_DIR = CURRENT_DIR.split('library.zip')[0]
print "SITE_MEDIA"
print CURRENT_DIR
print "SITE_MEDIA"
print os.path.join(os.path.dirname(__file__), 'media').replace('\\', '/')
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^prosto/', include('prosto.foo.urls')),
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root':os.path.join(os.path.dirname(__file__), 'media').replace('\\', '/')}),
# Uncomment the admin/doc line below to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)
Усьо, у мну работает, и в клиента, дай Боже ему здоровья, тоже.