From 629a84f43243e1ee905ed985458cdd98c0192774 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 27 Dec 2020 18:38:18 +0200 Subject: [PATCH] app.py: cleanup a bit. --- etebase_fastapi/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etebase_fastapi/app.py b/etebase_fastapi/app.py index 6fbdd04..81772b4 100644 --- a/etebase_fastapi/app.py +++ b/etebase_fastapi/app.py @@ -3,10 +3,12 @@ import os from django.core.wsgi import get_wsgi_application from fastapi.middleware.cors import CORSMiddleware -from django.conf import settings - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "etebase_server.settings") application = get_wsgi_application() + +from django.conf import settings + +# Not at the top of the file because we first need to setup django from fastapi import FastAPI, Request from .exceptions import CustomHttpException