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.
- [Answer]-AttributeError: 'module' object has no attribute 'META' in Django Project
- [Answer]-Django template tag argument count error
- [Answer]-IntegrityError #1062 in django.db.utils – Duplicate entry for key 2
- [Answer]-Django generic class-based views – handling ListView and DetailView in a single Mixin
Source:stackexchange.com