2008/11/17

Google AppEngine with Django 1.0 on Windows

I tried Google AppEngine with Django 1.0.1 today together with that gae-django-helper r64. On my windows box, I got this error report:

source_file = , source_file.load_module = , submodule_fullname = 'django.core.files.temp'
django.zip\django\core\files\temp.py in TemporaryFile()
: 'module' object has no attribute 'unlink'
Fortunately, I found this patch on rietveld issue list. So my workaround is simply add following two lines in the beginning of main.py which is provided by gae-django-helper.

if os.name == 'nt':
os.unlink = lambda: None
Because os.unlink is only called when OS is windows, it is safe when running your application in app engine.

0 comments:

Footer

  © Blogger template 'Grease' by Ourblogtemplates.com 2008

Back to TOP