Hi,

Channel isn't a field type - it's a separate datastructure entirely from a
database/Django models and is powered by its own code and servers (the
channel layer).

If you want to persist the name of a reply_channel for use later, like
knowing what channel connections are on to send information down, then use
a CharField(max_length=255), and put the name of the channel in that (which
is usually reply_channel.name). You can then take the string name and pass
it to channel to make it again like Channel(reply_channel_name).

Hope that helps,
Andrew

On Thu, Jan 19, 2017 at 6:57 AM, Nikoleta Misheva <[email protected]>
wrote:

> Hello, sorry to bother you but how do you make a django-channels  Channel
> field in a Django model? I tried to use ForeignKey and ForeignObject but
> doesn't do the work.
> Thank you in advance :)
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/ace270a5-ccba-43b2-aa54-bc425de9f709%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ace270a5-ccba-43b2-aa54-bc425de9f709%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
To post to this group, send email to [email protected].
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/CAFwN1upvoktT4J-szP7aO4qKWMDAobG0xjZGjQkuyZV2Z4ZMEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to