Define the DJANGO_SETTINGS_MODULE environment variable in your app.yaml config. https://developers.google.com/appengine/docs/python/config/appconfig#env_variables
This will ensure it's always available to any entry point that's handling a request. On Mon, May 28, 2012 at 6:23 AM, Amine Azariz <[email protected]>wrote: > I am using Django 1.2, Python 2.5. This error happens from time to time. - > e.g. some tasks got this error, some - not. > > How to solve this one? > > > File > "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/template/loader.py", > line 168, in get_template_from_string > return Template(source, origin, name) > File > "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/template/__init__.py", > line 156, in __init__ > if settings.TEMPLATE_DEBUG and origin is None: > File > "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/utils/functional.py", > line 276, in __getattr__ > self._setup() > File > "/base/python_runtime/python_lib/versions/third_party/django-1.2/django/conf/__init__.py", > line 38, in _setup > raise ImportError("Settings cannot be imported, because environment > variable %s is undefined." % ENVIRONMENT_VARIABLE) > ImportError: Settings cannot be imported, because environment variable > DJANGO_SETTINGS_MODULE is undefined. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine/-/A1bWVSwArvMJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
