Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django cache and settings error #2

Open
elsigh opened this issue Jun 12, 2013 · 2 comments
Open

django cache and settings error #2

elsigh opened this issue Jun 12, 2013 · 2 comments

Comments

@elsigh
Copy link

elsigh commented Jun 12, 2013

Any reason gcm.py opts for django's cache module instead of using GAE's memcache one?

I don't use django and had to edit gcm.py to replace cache with memcache.

Thanks for this by the way!

@yosukesuzuki
Copy link

I got same error.

File "/base/data/home/apps/s~xxxx/1.372597888987958486/gae_python_gcm/gcm.py", line 21, in <module>
    from django.core.cache import cache

File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/django-1.4/django/core/cache/__init__.py", line 76, in <module>
    if not settings.CACHES:

File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/django-1.4/django/utils/functional.py", line 184, in inner
    self._setup()

File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/django-1.4/django/conf/__init__.py", line 40, 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.

I don't use django too.

@hone5t
Copy link

hone5t commented Mar 16, 2014

yup get the same error you have to delete the cache and replace it with memcache
and for importing change to
from google.appengine._internal.django.utils import importlib
and delete the import setting part so there will be no error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants