Make manage.py spit out tracebacks, without a patched django

I first made --traceback the default in my patches to django, but this
broke several regressions tests (when Luke built .deb packages), so he reverted that change,
and I'm putting this default into our manage.py instead

(imported from commit 460253561e637d8a6692c68bbd3859f266dbf83d)
This commit is contained in:
acrefoot 2013-05-22 15:18:45 -04:00
parent d159627aa5
commit aedb81c490
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,10 @@ import os
import sys import sys
if __name__ == "__main__": if __name__ == "__main__":
if "--no-traceback" not in sys.argv and len(sys.argv) > 1:
sys.argv.append("--traceback")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "humbug.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "humbug.settings")
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line