cookiecutter-django icon indicating copy to clipboard operation
cookiecutter-django copied to clipboard

Adding support for channels

Open cdvv7788 opened this issue 7 years ago • 13 comments

We should have the option to ask users if they want to use channels, just like we do with celery. Setting up channels should be easy, using the in memory layer locally and redis on production (or redis on both). Not much has to be assumed and is easy to implement.

Thoughts?

cdvv7788 avatar Feb 27 '17 22:02 cdvv7788

My only concern is that its not really fully tested on Windows (a platform we support); I'd have to run it through some tests on Windows before I would be comfortable with this.

burhan avatar Feb 28 '17 10:02 burhan

I have not worked on windows for years, so i wouldn't know about channels support. @burhan how can i help to test that?

cdvv7788 avatar Feb 28 '17 11:02 cdvv7788

Channels also doesn't work on Elastic Beanstalk. As incredibly awesome as that platform is, it still forces you to use just mod_wsgi. 😢

As for windows support, if there's issues, we might be able to use this as a way to connect with the Django Channels and get better support for it in Windows. For what it's worth, I know @andrewgodwin uses Windows for programming that isn't Django/Python.

pydanny avatar Feb 28 '17 18:02 pydanny

Last time I spoke with @andrewgodwin he mentioned he mostly uses the embedded linux runtime that comes with Windows (I wanted to get some pointers for Windows development as I too have to deal with it for work).

burhan avatar Feb 28 '17 18:02 burhan

Yes, I do all my development on Windows inside the Linux Subsystem for Windows, which is basically just another UNIX with Ubuntu userland. It's entirely different from running under Win32 windows because it's just Linux-compatible, so things just work.

andrewgodwin avatar Feb 28 '17 18:02 andrewgodwin

I just ran a project with channels on windows with linux subsystem, just like @andrewgodwin. Works as expected. Do we need someone to test this directly on windows before proceeding?

cdvv7788 avatar Mar 08 '17 18:03 cdvv7788

Not every Windows user of Cookiecutter Django runs the Linux Subsystem for Windows. If we expect all our Windows users to utilize this functionality, your pull request will need:

  • Documentation that references the official guides for the Linux Subsystem for Windows
  • Documentation on how to use Cookiecutter Django in the Linux Subsystem for Windows
  • A logic branch during the rendering process that doesn't allow Channels to be used with Elastic Beanstalk setups

Personally, I would love to see this PR happen. We might even be able to get some oversight on the pull request from the MS Azure or VS Studio team.

pydanny avatar Mar 08 '17 18:03 pydanny

Ok, i get your point @pydanny. I will test this directly on windows before proceeding. If it does not work I will start the implementation following those guidelines.

cdvv7788 avatar Mar 09 '17 00:03 cdvv7788

Beanstalk now supports multicontainer deployments. Therefore, we could probably use Channels through Docker. I am messing around at the moment to setup django-cookiecutter through multicontainer Docker on Beanstalk, but all development is on hold now due to a (silly) bug - https://forums.aws.amazon.com/thread.jspa?threadID=251051

philippeluickx avatar Mar 24 '17 15:03 philippeluickx

@philippeluickx, according to https://forums.aws.amazon.com/thread.jspa?threadID=251051 it looks like the bug is fixed. If you could get ELB to work with multicontainer Docker we would make a PR for this project an absolute priority.

pydanny avatar Apr 24 '17 17:04 pydanny

I managed to get cookiecutter run on multicontainer docker in EBS: updated ticket https://github.com/pydanny/cookiecutter-django/issues/1004

philippeluickx avatar Oct 05 '17 08:10 philippeluickx

Is there any improvements or personal projects on this subject. I am a newbie to django and I will try to go for production soon. I am using channels in my project. I would be glad if anyone could show me the best possible solution. By the way, thanks for all the work that has been done until now, experiencing with open-source and contributions from all over the world always amaze me:)

yusufhilmi avatar Jun 14 '20 14:06 yusufhilmi

channels support has been maturing in django 4.x with async views and such. Any progress on this?

morenoh149 avatar Nov 30 '23 20:11 morenoh149