openplans / shareabouts

Shareabouts is a mapping application for crowdsourced info gathering.
GNU General Public License v3.0
276 stars 150 forks source link

Include django-redis dependency and update to support Django 3.2 #219

Closed BenSturmfels closed 1 year ago

BenSturmfels commented 1 year ago

Given that Redis config appears in the default settings, it seems appropriate to include it as a dependency.

The default Redis config in settings.py also isn't compatible with a django-redis that supports Django 3.2, giving:

InvalidCacheBackendError: Could not find backend 'redis_cache.cache.RedisCache': cannot import name 'get_cache'

and, when that's fixed, giving the following due to issues in splitting code:

ValueError: Redis URL must specify one of the following schemes (redis://, rediss://, unix://)

I've updated the config to address this. My thinking is that the defaults should be simple and anything more complex needs should be addressed in local_settings.py.

I've also removed the Celery config since Celery isn't used anywhere within the frontend and BROKER_URL was being set based on the Redis config.

BenSturmfels commented 1 year ago

Great stuff on the Django 3.2 upgrade @mjumbewu! This is the first time I've tried them out. Let me know if you think the change above is appropriate.