[Fixed]-Accessing a django model in middleware (django>1.7)

1👍

You need to use the new API to get a WSGI handler:

from django.core.wsgi import get_wsgi_application

application = get_wsgi_application()

This will call django.setup() for you, which will populate the app registry.

👤knbk

Leave a comment