-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hi, really like your project.
I'm trying to get this working on my dev environment but I keep getting an empty Channel layer object.
I added the needed config, see below and ran migrations (which worked), but below code will return None.
from channels.layers import get_channel_layer
c = get_channel_layer()
print(c) #prints None
Below part of my config:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": "postgres",
"HOST": "postgres",
},
"channels_postgres": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": "postgres",
"HOST": "postgres",
"PORT": "5432",
}
}
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_postgres.core.PostgresChannelLayer",
"CONFIG": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": "postgres",
"HOST": "postgres",
"PORT": "5432",
}
}
}
Part of requirements.txt
channels==4.2.2
channels-redis==4.2.0
channels-postgres==1.1.2
Guess it is something stupid I'm missing :)
Metadata
Metadata
Assignees
Labels
No labels