-
Notifications
You must be signed in to change notification settings - Fork 18
/
manage.py
executable file
·39 lines (32 loc) · 1.12 KB
/
manage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python
# manage.py
# Django default management commands, with some special sauce.
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Thu Oct 08 14:22:54 2015 -0400
#
# Copyright (C) 2015 District Data Labs
# For license information, see LICENSE.txt
#
# ID: manage.py [] [email protected] $
"""
Django default management commands, with some special sauce.
"""
##########################################################################
## Imports
##########################################################################
import os
import sys
import dotenv
##########################################################################
## Main Method
##########################################################################
if __name__ == "__main__":
## Manage Django Environment
if os.path.exists('.env'):
dotenv.read_dotenv()
## Set the default settings module
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "trinket.settings.production")
## Execute Django utility
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)