Environment variable DJANGO_SETTINGS_MODULE is undefined

431 views
Skip to first unread message

Chris

unread,
Nov 16, 2008, 11:35:51 PM11/16/08
to Google App Engine
I'm running a basic webapp install, but where ever my code imports
google.appengine.ext.db.djangoforms or django.newforms I'm getting the
error "Environment variable DJANGO_SETTINGS_MODULE is undefined".
Since webapp doesn't using Django's settings, what could be causing
this?

Pranny

unread,
Nov 17, 2008, 5:12:31 AM11/17/08
to Google App Engine
Before you import any django libraries, except for those from
google.appengine.* you ust specify the Django settings.
If you are using a fully Django environment, you should refer to
http://code.google.com/p/google-app-engine-samples/source/browse/trunk/django_example/settings.py
for an idea of what settings should be like.

However, i fear that you are not using a fully Django base, so in that
case, you can see http://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/
for importing Django in GAE.

I hope this will solve your problem.

Regards,
Pranav

Jesaja Everling

unread,
Nov 17, 2008, 5:16:39 AM11/17/08
to Google App Engine
Hi Chris!

Did you make sure to first import google.appengine.webapp.template
before importing the djangoforms module?
Please have a look at this article:

http://code.google.com/appengine/articles/djangoforms.html

I don't think django.newforms exists in appengine, AFAIK it has been
deprecated.

Best Regards,

Jesaja Everling


On 17 Nov., 05:35, Chris <chriss...@gmail.com> wrote:
> I'm running a basic webapp install, but where ever my code imports
> google.appengine.ext.db.djangoforms or django.newforms I'm getting the
> error "Environment variable DJANGO_SETTINGS_MODULE is undefined".
> Since webapp doesn't using Django's settings, what could be causing
> this?

On 17 Nov., 11:12, Pranny <pra...@gmail.com> wrote:
> Before you import any django libraries, except for those from
> google.appengine.* you ust specify the Django settings.
> If you are using a fully Django environment, you should refer tohttp://code.google.com/p/google-app-engine-samples/source/browse/trun...
> for an idea of what settings should be like.
>
> However, i fear that you are not using a fully Django base, so in that
> case, you can seehttp://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/
Reply all
Reply to author
Forward
0 new messages