#!/usr/bin/env python
import os
import sys
import dotenv

if __name__ == "__main__":
    dotenv.read_dotenv(".env")
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
    from django.core.management import execute_from_command_line
    execute_from_command_line(sys.argv)

@@ -86,34 +86,117 @@
     
-dotenv.read_dotenv(
+repo_dir = os.path.dirname(os.path.realpath(__file__))%0A    dotenv.read_dotenv(os.path.join(repo_dir, 
 %22.env%22)
+)
 %0A   

Allow running manage.py outside of the repo directory