DJE-031
Critical
Configuration
Missing CHANNEL_LAYERS configuration
Error message
InvalidChannelLayerError: No channel layer configured
djust uses Django Channels for WebSocket communication. Without a properly configured CHANNEL_LAYERS setting, LiveViews cannot broadcast updates to connected clients, and features like push_to_view() will fail.
channels
config
redis
Affected versions: >=0.2.0
Solution
Before (problematic)
# settings.py
# No CHANNEL_LAYERS defined
After (fixed)
# settings.py — Development
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels.layers.InMemoryChannelLayer"
}
}
# settings.py — Production
# CHANNEL_LAYERS = {
# "default": {
# "BACKEND": "channels_redis.core.RedisChannelLayer",
# "CONFIG": {
# "hosts": [("127.0.0.1", 6379)],
# },
# }
# }