You should use an ASGI server (uvicorn/daphne) with an SSL-terminating
server (e.g. nginx) in front of it and proxying to it. Django-sslserver is
a WSGI-based server and so can't support WebSockets.
Andrew
On Tue, Dec 25, 2018 at 4:44 PM wrote:
> How can I use channels with https at developmen
This may be related to https://github.com/django/asgiref/issues/251 - what
version of asgiref are you running?
Andrew
On Tue, Apr 6, 2021, at 9:43 AM, kradem wrote:
> > 500 Internal Server Error
> > Exception inside application.
> > Daphne
>
> This error raises every time a file from static f
ef<4,>=3.3.2, but you have asgiref 3.3.1 which is incompatible."), but
> static files are served well.
>
> I tried with the very last version 3.3.3 (-e
> git+https://github.com/django/asgiref.git#egg=asgiref), but problem hasn't
> been fixed that way.
>
>
ot;django 3.2 requires
>> asgiref<4,>=3.3.2, but you have asgiref 3.3.1 which is incompatible."), but
>> static files are served well.
>>
>> I tried with the very last version 3.3.3 (-e
>> git+https://github.com/django/asgiref.git#egg=asgiref), but problem
t;
> HTTP GET /static/css/style.css 500 [0.35, 127.0.0.1:37982]
> HTTP GET /static/js/jquery-2.2.4.min.js 500 [0.35, 127.0.0.1:37988]
>
> Dana utorak, 6. travnja 2021. u 18:09:33 UTC+2 korisnik Andrew Godwin napisao
> je:
>> __
>> Aha, glad to hear it! My apologies that
500 Internal Server Error
> Transfer-Encoding: chunked
> Content-Type: text/html; charset=utf-8
>
> Dana utorak, 6. travnja 2021. u 18:26:34 UTC+2 korisnik Andrew Godwin napisao
> je:
>> __
>> The tracebacks are there somewhere, you might have to look at the raw HTTP
>
Ah yes, that's because the URL parsing/conversion all happens in the main
(async, in ASGI mode) thread - and because to_python is a a synchronous
function interface, there is literally nothing you can do to make it work.
The only real way of fixing this would be for Django to patch the URL
conv
The example you presented should Just Work - that error generally only occurs
if you return an un-awaited coroutine, which if you're just returning a
response, should be impossible.
What version of Python and Django are you running?
Andrew
On Thu, Aug 12, 2021, at 11:03 AM, Steven Mapes wrote:
SyncConsumer isn't async - it runs inside a separate synchronous thread.
You'll need to get the event loop from the other thread and use
call_soon_threadsafe instead!
Andrew
On Wed, Aug 14, 2019 at 6:59 PM Dan Merillat wrote:
>
> I have an application that's 99% using the ORM and database work
It should be fine, but you will need to be careful - there's a lot of
side-effects with run_in_executor you should be aware of like the way
exceptions propagate (Django won't handle them right for you) and the
possibility of deadlock.
Andrew
On Fri, Oct 18, 2019 at 11:27 AM BR wrote:
> Should I
Hi Larry,
Your problem is the Python version - 3.5 is somewhat old (but most
importantly, was still a very rough release for asyncio) and isn't
supported by any current release of asgiref/channels for that reason. If
you are able to upgrade that, I very much recommend it.
Andrew
On Sat, Feb 22,
301 - 311 of 311 matches
Mail list logo