question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to connect with Django app?

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jordaneremieffcommented, May 9, 2020

@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).

1reaction
jordaneremieffcommented, 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/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing your first Django app, part 1
If this is your first time using Django, you'll have to take care of some initial setup. Namely, you'll need to auto-generate some...
Read more >
How To Create a Django App and Connect it to a Database
How To Create a Django App and Connect it to a Database · Step 1 — Creating the Database · Step 2 —...
Read more >
Your First Steps With Django: Set Up a Django Project
Set up a virtual environment; Install Django; Pin your project dependencies; Set up a Django project; Start a Django app. Use this tutorial...
Read more >
Running Django on the App Engine standard environment
Objectives · Costs · Before you begin · Prepare your environment · Create backing services · Run the app on your local computer...
Read more >
Connect a Django application to PlanetScale
Next, you need to set up your PlanetScale database and connect to it in the Django application. You can create a database either...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found