When I import it inside a handler with this:
from django.core.validators import email_re
I get the following error when I run the app:
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django/django/conf/__init__.py", line 53, in _import_settings
raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMENT_VARIABLE
EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined.
It’s unclear to me how to set that environment variable in a webapp project. Do I need to add some additional settings.py file? Any examples?
Try using following lines of code after your imports:
Read here for more info: http://groups.google.com/group/tipfy/browse_thread/thread/78c17b4f82c894a6