Trouble with Zipfile, Django 1.0, GAE Django Helper

5 views
Skip to first unread message

Dylan Lorimer

unread,
Nov 3, 2008, 12:07:16 AM11/3/08
to Google App Engine
So I'm trying to get the app engine django helper working with the
zipfile example for django 1.0, and running into a problem.

I should also mention that I'm using the bootstrap method in the GAE
django helper readme. I'm also using version 66 of the django helper
(pulled via svn.)

I created the django.zip following the exact instructions at
http://code.google.com/appengine/articles/django10_zipimport.html.

So, the trouble I'm having is that after dropping in django.zip into
the root level of my application folder, I start the app server, and
in the browser see the following error(s):

########
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 2413, in _HandleRequest
base_env_dict=env_dict)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 348, in Dispatch
base_env_dict=base_env_dict)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 1848, in Dispatch
self._module_dict)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 1766, in ExecuteCGI
reset_modules = exec_script(handler_path, cgi_path, hook)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 1664, in
ExecuteOrImportScript
script_module.main()
File "/Users/edylan/Development/JaceyPhotographs2/main.py", line 48,
in main
util.run_wsgi_app(application)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/webapp/util.py", line 76, in run_wsgi_app
result = application(env, _start_response)
File "/Users/edylan/Development/JaceyPhotographs2/django.zip/django/
core/handlers/wsgi.py", line 228, in __call__
File "/Users/edylan/Development/JaceyPhotographs2/django.zip/django/
core/handlers/base.py", line 40, in load_middleware
continue
ImproperlyConfigured: Error importing middleware
django.contrib.auth.middleware: "No module named
contrib.auth.middleware"

########
looks like the error is in my django.zip that I'm creating, but I'm
not sure how to fix this. Any ideas?

Kitahara

unread,
Nov 4, 2008, 1:38:46 AM11/4/08
to Google App Engine
Hi Dylan.

I think ,it will work for you.
http://github.com/Surgo/django-on-gae/
it work for zip archived django 1.0 on GAE with Helper.

thank you.

Kosei.

On Nov 3, 2:07 pm, Dylan Lorimer <write2dy...@gmail.com> wrote:
> So I'm trying to get the app engine django helper working with the
> zipfile example for django 1.0, and running into a problem.
>
> I should also mention that I'm using the bootstrap method in the GAE
> django helper readme. I'm also using version 66 of the django helper
> (pulled via svn.)
>
> I created the django.zip following the exact instructions athttp://code.google.com/appengine/articles/django10_zipimport.html.

Dylan Lorimer

unread,
Nov 4, 2008, 2:23:24 AM11/4/08
to google-a...@googlegroups.com
Hi Kosei,

Thank you so much for providing this package. Indeed it does work! I'm still a bit befuddled as to why I was never able to get a fresh svn checkout of the django app helper + a django.zip created following Guido's directions working, but I'm just happy to have a working 1.0 install!

Thanks again.
-dylan

Dylan Lorimer

unread,
Nov 4, 2008, 11:20:20 AM11/4/08
to Google App Engine
Hi Kosei -

Any idea why I can't import newforms in your package?

On Nov 3, 10:38 pm, Kitahara <kitah...@serow.jp> wrote:
> Hi Dylan.
>
> I think ,it will work for you.http://github.com/Surgo/django-on-gae/
> it work for zip archiveddjango1.0 onGAEwith Helper.
>
> thank you.
>
> Kosei.
>
> On Nov 3, 2:07 pm, Dylan Lorimer <write2dy...@gmail.com> wrote:
>
> > So I'm trying to get the app enginedjangohelper working with the
> > zipfile example fordjango1.0, and running into a problem.
>
> > I should also mention that I'm using the bootstrap method in theGAE
> >djangohelper readme. I'm also using version 66 of thedjangohelper
> > (pulled via svn.)
>
> > I created thedjango.zip following the exact instructions athttp://code.google.com/appengine/articles/django10_zipimport.html.
>
> > So, the trouble I'm having is that after dropping indjango.zip into
> > looks like the error is in mydjango.zip that I'm creating, but I'm

Kitahara

unread,
Nov 4, 2008, 12:22:42 PM11/4/08
to Google App Engine
Hi Dylan.

Django 1.0 not support newforms.

plese read follow document.
http://docs.djangoproject.com/en/dev/releases/1.0-porting-guide/#use-django-forms-instead-of-newforms

replace from
from django import newforms as forms
to
from django import forms

Thanks.
Kosei.

Daniel O'Brien (Google)

unread,
Nov 4, 2008, 7:59:24 PM11/4/08
to Google App Engine
It sounds as if you've found an alternate solution, but regarding the
error you ran into while following the article, the following as part
of step 4 should resolve the problem:

zip -r django.zip django/contrib/__init__.py django/contrib/auth
django/contrib/sessions

Note that you may also need to adjust MIDDLEWARE_CLASSES in
settings.py to enable
'django.contrib.sessions.middleware.SessionMiddleware', since auth
depends on it.

Daniel

On Nov 2, 9:07 pm, Dylan Lorimer <write2dy...@gmail.com> wrote:
> So I'm trying to get the app engine django helper working with the
> zipfile example for django 1.0, and running into a problem.
>
> I should also mention that I'm using the bootstrap method in the GAE
> django helper readme. I'm also using version 66 of the django helper
> (pulled via svn.)
>
> I created the django.zip following the exact instructions athttp://code.google.com/appengine/articles/django10_zipimport.html.
Reply all
Reply to author
Forward
0 new messages