jrief / django-websocket-redis

Websockets for Django applications using Redis as message queue
http://django-websocket-redis.awesto.com/
MIT License
897 stars 222 forks source link

chatserver example templates in Django 1.8+ #246

Open morrisfranken opened 7 years ago

morrisfranken commented 7 years ago

From Django 1.8 and onwards the TEMPLATE_* settings are depricated in settings.py, and will raise a TemplateDoesNotExist exception on those versions of Django. The following can be replaced:

TEMPLATE_DEBUG = ...
TEMPLATE_CONTEXT_PROCESSORS = ...
TEMPLATE_LOADERS = ...

with the following

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                'ws4redis.context_processors.default',
            ],
        },
    },
]
jrief commented 7 years ago

Thanks, it would be great, if you can provide a tested pull request.