cookiecutter-django
cookiecutter-django copied to clipboard
Adding support for channels
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?
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.
I have not worked on windows for years, so i wouldn't know about channels support. @burhan how can i help to test that?
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.
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).
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.
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?
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.
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.
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, 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.
I managed to get cookiecutter run on multicontainer docker in EBS: updated ticket https://github.com/pydanny/cookiecutter-django/issues/1004
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:)
channels support has been maturing in django 4.x with async views and such. Any progress on this?