-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set DJANGO_CONFIGURATION in manage.py
- Loading branch information
1 parent
084277e
commit cb09ede
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
import sys | ||
|
||
if __name__ == '__main__': | ||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rdwatch.server.settings') | ||
import configurations.importer | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
|
||
from django.core.management import execute_from_command_line | ||
def main() -> None: | ||
os.environ['DJANGO_SETTINGS_MODULE'] = 'rdwatch.server.settings' | ||
os.environ.setdefault('DJANGO_CONFIGURATION', 'DevelopmentConfiguration') | ||
configurations.importer.install(check_options=True) | ||
|
||
execute_from_command_line(sys.argv) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |