From b4a21ae7e74764f48c359dc1c9db0f82bbda4ead Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 27 Jul 2021 09:53:17 +0530 Subject: [PATCH] Load env before main --- manage.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/manage.py b/manage.py index ebb378e..9a088c8 100755 --- a/manage.py +++ b/manage.py @@ -5,7 +5,6 @@ import os import sys - def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gmba_django.settings.development') @@ -24,9 +23,9 @@ def main(): execute_from_command_line(sys.argv) -if __name__ == '__main__': - main() - dotenv.load_dotenv( os.path.join(os.path.dirname(__file__), '.env') ) + +if __name__ == '__main__': + main()