diff --git a/django_project/middleware.py b/django_project/middleware.py index 34c6cc5..390e7d1 100644 --- a/django_project/middleware.py +++ b/django_project/middleware.py @@ -14,5 +14,5 @@ class LogRequestsMiddleware: return response def log(self, request, response, start, end): - logging.info(f"{request.method} {request.path_info} -> {response.status_code}, took {end - start}s") + logging.info(f"{request.method} {request.path_info} -> RESP {response.status_code}, took {end - start}s") diff --git a/django_project/wsgi.py b/django_project/wsgi.py index da9babb..3611700 100644 --- a/django_project/wsgi.py +++ b/django_project/wsgi.py @@ -6,3 +6,4 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_project.settings") # use app for granian, application for gunicorn app = get_wsgi_application() +application = app