Hi Andrew, Thanks for the reply.
I've managed to get it working running Daphne serving both HTTP and WebSocket requests. Your reply prompted me to look into what I was currently doing, and it crossed my mind that I was running via Gunicorn which from now reading the deployment documentation for Django Channels states WebSockets won't work via Gunicorn. I'm now running it via a systemctl script using - ExecStart=/var/www/myproject/env/bin/daphne -b 0.0.0.0 -p 8000 -u /tmp/myproject.sock myproject.asgi:channel_layer ExecStartPost=/var/www/myproject/env/bin/python3 manage.py runworker This is then reverse proxied through nginx. Hopefully this is the best way to go about it when running inside of a systemctl service, although I couldn't find any documentation on this so I adapted how tutorials / examples use a systemctl service for Django with Gunicorn. Thanks for the prompt response and appreciate the work done for Django! Adam On Tuesday, 31 January 2017 12:09:17 UTC, adam....@hedgehoglab.com wrote: > > Hi everyone, > > We are currently considering using Django Channels for implementing > WebSockets into a project. I am wondering if it is known that Django > Channels runs perfectly within the same Django project as DRF? > > I have spent a little time investigating this myself and could manage to > get DRF working on its own, but channels not working, and channels working > on its own but not DRF (in the same project), depending on whether I ran > the daphne server or 'runserver' which I assume runs WSGI. Couldn't find > anything online about getting these two side by side. > > Thanks, > Adam > > ====================================================== > > hedgehog lab is a limited company registered in England and Wales. > Registered number: 05993194. Registered office: Generator Studios, > Trafalgar Street, Newcastle Upon Tyne, NE1 2LA > > -- ====================================================== hedgehog lab is a limited company registered in England and Wales. Registered number: 05993194. Registered office: Generator Studios, Trafalgar Street, Newcastle Upon Tyne, NE1 2LA -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/f6c6578f-8ec4-4af8-a306-51f3831ae6ae%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.