Re: Channel: Migrate regular Django project to Channels2

2018-11-09 Thread Zhiyu/Drew Li
Thanks. I added a async http consumer from the doc. It kept throwing error on "Header name 'Content-Type' expected to be `bytes`, but got ``". I was able to get it running after changing to (b"Content-Type", b "text/plain"), from channels.generic.http import AsyncHttpConsumer class BasicHttpCo

Re: Channel: Migrate regular Django project to Channels2

2018-11-07 Thread Andrew Godwin
Channels doesn't take over at all unless you configure an async consumer. To make sure it's working I'd recommend writing a single async consumer, and running a test against that to ensure it works. Andrew On Wed, Nov 7, 2018 at 1:11 PM Zhiyu (Drew) Li wrote: > Hi there, > > I am trying to migr

Channel: Migrate regular Django project to Channels2

2018-11-07 Thread Zhiyu (Drew) Li
Hi there, I am trying to migrate an existing Django project to Channels2. We want to keep all existing sync codes unchanged and we will continue mode of the development in sync mode. But having Channels opens the opportunity to develop some features in async mode. I was able to install channels2