Comments (9)
I have the same issue. Any suggestions gratefully received.
from cookiecutter-django.
I've fixed this now.
First add django-pylibmc-sasl==0.2.4
to requirements.txt.
Then in settings.py replace the "CACHING" section at the end of the file with:
########## CACHING
# Only do this here because thanks to django-pylibmc-sasl and pylibmc memcacheify is painful to install on windows.
os.environ['MEMCACHE_SERVERS'] = os.environ.get('MEMCACHIER_SERVERS', '')
os.environ['MEMCACHE_USERNAME'] = os.environ.get('MEMCACHIER_USERNAME', '')
os.environ['MEMCACHE_PASSWORD'] = os.environ.get('MEMCACHIER_PASSWORD', '')
CACHES = {
'default': {
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
'LOCATION': os.environ.get('MEMCACHIER_SERVERS', ''),
'TIMEOUT': 500,
'BINARY': True,
'OPTIONS': { 'tcp_nodelay': True }
}
}
########## END CACHING
It should now work fine on Heroku.
from cookiecutter-django.
Any reason for not doing this django-configuration style?
from cookiecutter-django.
Sorry, no reason. Was just in a rush to get something working!
I'm actually now replacing it with a redis cache since pylibmc isn't Python 3 compatible.
from cookiecutter-django.
Hmm - forgot that boto is in this setup. Looks like Python 3 will have to wait a bit longer....
from cookiecutter-django.
@geeljire @knitatoms https://github.com/rdegges/django-heroku-memcacheify should be able to help you out. It's a one line configuration.
@pydanny if you think it can be included here, I can send a PR! The only issue is you need to install lib-memcached
before you can install this.
from cookiecutter-django.
@theskumar A PR sounds great. Please include documentation on setting up lib-memcached.
from cookiecutter-django.
@pydanny @geeljire this issue is resolved can we close this please.
from cookiecutter-django.
Thanks @theskumar. Closing.
from cookiecutter-django.
Related Issues (20)
- Prettier Pre-Commit always return failed HOT 5
- Add a citation file HOT 6
- unregistered task of type 'users.tasks.get_users_count' in celery
- Admin login as non-superuser avoids allauth login flow HOT 6
- Add Hadolint
- python: can't open file '/app/manage.py': [Errno 2] No such file or directory
- `DJANGO_ADMIN_FORCE_ALLAUTH` is not covered by tests
- Line length of 88 chars HOT 3
- Migrate to Django 4.2 storage object syntax HOT 1
- Integrate React as the frontend using a hybrid approach. HOT 3
- Webpack deprecation warnings prevent development
- Hybrid local development HOT 6
- Allauth template elements HOT 4
- rabbitmq support for celery HOT 4
- Add `sphinxcontrib-django` for documentation
- ci.yml for running pytest is building docs image unnecessarily (run time 4:30m instead of 3:00m)
- Split the `docs` service out of `local.yml` HOT 2
- You probably don't need `get_user_model` HOT 1
- CI should test against production environment, not local HOT 2
- Allow multiple imports on one line HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookiecutter-django.