This repository has been archived by the owner on Sep 13, 2020. It is now read-only.
forked from simonw/djangopeople.net
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified development by re-adding a custom manage.py
- Loading branch information
Showing
3 changed files
with
22 additions
and
8 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 +1 @@ | ||
web: envdir env django-admin.py runserver 0.0.0.0:8000 | ||
web: python manage.py runserver 0.0.0.0:8000 |
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
import glob | ||
|
||
if __name__ == "__main__": | ||
if 'test' in sys.argv: | ||
env_dir = os.path.join('tests', 'env') | ||
else: | ||
env_dir = 'env' | ||
env_vars = glob.glob(os.path.join(env_dir, '*')) | ||
for env_var in env_vars: | ||
with open(env_var, 'r') as env_var_file: | ||
os.environ.setdefault(env_var.split(os.sep)[-1], | ||
env_var_file.read().strip()) | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
execute_from_command_line(sys.argv) |