[Answer]-Writing django custom backend

1👍

Just put it in your app that requires your middleware. Or create a django app that holds all your middlewares.

0👍

Your backend is normal Python code, and just like other Python modules the files can live anywhere. As long as you are able to import it using the Python shell, django can use it.

In other words as long as it is in PYTHONPATH, then your applications can use it.

It does not need to be part of an app or a project.

Leave a comment