Load env before main
This commit is contained in:
parent
72d55a5f14
commit
b4a21ae7e7
1 changed files with 3 additions and 4 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue