Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to connect with Django app? #77

Closed
levinotik opened this issue Dec 16, 2019 · 7 comments
Closed

How to connect with Django app? #77

levinotik opened this issue Dec 16, 2019 · 7 comments
Labels
docs Documentation

Comments

@levinotik
Copy link

levinotik commented Dec 16, 2019

Hi there,

I'm trying to get a better idea of what using Mangum usage looks like with a Django application. I've looked at the example, but don't really understand how that translates to pointing to a Django application.

More specifically, what does app in

handler = Mangum(app, enable_lifespan=False)

refer to when pointing to a full Django application?

@jordaneremieff
Copy link
Collaborator

This is something I’d like to document here, but I haven’t had a chance to dig into the latest developments for ASGI support in Django yet. In regards to Channels, it does not currently support ASGI 3, so it will not work with Mangum - though I am open to supporting ASGI 2 here again.

@jordaneremieff jordaneremieff added the docs Documentation label Dec 19, 2019
@jordaneremieff
Copy link
Collaborator

Closing in favour of #48

@jordaneremieff
Copy link
Collaborator

jordaneremieff commented Apr 19, 2020

@levinotik I've created a Django application example using Serverless Framework if you're still interested, can find it here: https://github.com/erm/serverless-mangum-examples/

@levinotik
Copy link
Author

Will check it out, thanks so much!

@levinotik
Copy link
Author

@ERM Thanks again. I know Websockets are still not supported. Will Django Channels work with Mangum? Looking to be able to use GraphQL subscriptions.

@jordaneremieff
Copy link
Collaborator

@levinotik I added an example configuration for Channels to the docs. I did just a brief test with the chat app from Channels tutorial, but didn't attempt to integrate any of the WebSockets backend stuff into it.

You can try with the current state of the master branch and should be able to get something working (could be potential issues I haven't anticipated, but you are able to try now).

@levinotik
Copy link
Author

Awesome, thanks a lot @ERM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation
Projects
None yet
Development

No branches or pull requests

2 participants