wrong imports channel ?

14 views
Skip to first unread message

Jules LE BRIS

unread,
Apr 12, 2018, 7:21:08 AM4/12/18
to Django users
Hi,

I would like to do something like this in views.py :

message = {"message":msg}
Channel('chat').send(message, immediately=True)

but the import : from channels import Channel doen't work. I'm using channels==2.0.2.

N. Srinivasan

unread,
Apr 12, 2018, 10:42:16 AM4/12/18
to django...@googlegroups.com
Thank you Sir!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b7684c27-9568-4321-a70b-29e58c550b3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Godwin

unread,
Apr 12, 2018, 1:31:10 PM4/12/18
to django...@googlegroups.com
Channels 2 has different objects and import paths - code from Channels 1 (like you have there) isn't compatible.

Andrew

--
Reply all
Reply to author
Forward
0 new messages