mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-29 13:04:05 +03:00
fix(settings): fixes wrong cache config used for heroku
* Installs `django-heroku-memcacheify` only on heroku to avoid installing `libmemcached-dev`[1] locally. [1] https://github.com/rdegges/django-heroku-memcacheify#install Fixes: https://github.com/pydanny/cookiecutter-django/issues/80
This commit is contained in:
parent
1ad866770a
commit
cfa787384d
|
@ -1,4 +1,5 @@
|
|||
# This file is here because many Platforms as a Service look for
|
||||
# requirements.txt in the root directory of a project.
|
||||
pylibmc==1.2.3 #
|
||||
pylibmc==1.2.3
|
||||
django-heroku-memcacheify==0.5
|
||||
-r requirements/production.txt
|
||||
|
|
|
@ -388,6 +388,11 @@ class Production(Common):
|
|||
|
||||
########## CACHING
|
||||
# Only do this here because thanks to django-pylibmc-sasl and pylibmc memcacheify is painful to install on windows.
|
||||
try:
|
||||
# See: https://github.com/rdegges/django-heroku-memcacheify
|
||||
from memcacheify import memcacheify
|
||||
CACHES = memcacheify()
|
||||
except ImportError:
|
||||
CACHES = values.CacheURLValue(default="memcached://127.0.0.1:11211")
|
||||
########## END CACHING
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user