wrong imports channel ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

wrong imports channel ?

Jules LE BRIS
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: wrong imports channel ?

N. Srinivasan
Thank you Sir!

On Thu, Apr 12, 2018 at 3:37 AM, Jules LE BRIS <[hidden email]> wrote:
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAEAcyBZpVtPgJhHdrvYR5Wg-em0nM%3DEdcqxJ9gvhHfWeP91ziA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wrong imports channel ?

Andrew Godwin-3
In reply to this post by Jules LE BRIS
Channels 2 has different objects and import paths - code from Channels 1 (like you have there) isn't compatible.

Andrew

On Thu, Apr 12, 2018 at 12:37 AM, Jules LE BRIS <[hidden email]> wrote:
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAFwN1uqCuYwJYkFpnQ%3DtcVXjNNZQi-5fx9GNj%2BmZkADntv1jLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.