Skip to content
Newer
Older
100755 33 lines (27 sloc) 1.01 KB
e3f86da django skeleton
James Socol authored Feb 3, 2010
1 #!/usr/bin/env python
d03b6f8 Adding middleware and tests. Removing dependency on django-localeurl.…
James Socol authored Apr 1, 2010
2 import os
ccca0cb [Bug 567960] Add vendor library.
James Socol authored Aug 11, 2010
3 import sys
67b8948 @willkg [bug 1116489] Tweak manage.py to be more helpful on errors
willkg authored Sep 26, 2015
4 import traceback
6fe3c3b pulling in support for settings_local.py
James Socol authored Feb 3, 2010
5
ccca0cb [Bug 567960] Add vendor library.
James Socol authored Aug 12, 2010
6 # Now we can import from third-party libraries.
c7079b1 @readevalprint [bug 663236] Add safe form monkeypatch from nuggets
readevalprint authored Aug 23, 2011
7
248dae0 @rlr [bug 963088] Fix deprecation warnings in manage.py
rlr authored Jan 23, 2014
8 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kitsune.settings_local')
9 os.environ.setdefault('CELERY_CONFIG_MODULE', 'kitsune.settings_local')
6fe3c3b pulling in support for settings_local.py
James Socol authored Feb 3, 2010
10
58541af @willkg [bug 1056298] Fix createsuperuser
willkg authored Dec 1, 2014
11 # MONKEYPATCH! WOO HOO!
12 # Need this so we patch before running Django-specific commands which
6650c53 @mythmon [Bug 1238055][Bug 1225606] Upgrade Django to 1.8.
authored Jan 8, 2016
13 # then result in a circular import.
67b8948 @willkg [bug 1116489] Tweak manage.py to be more helpful on errors
willkg authored Sep 26, 2015
14 try:
15 from kitsune.sumo.monkeypatch import patch # noqa
16 patch()
17 except ImportError:
18 print 'OH NOES! There was an import error:'
19 print ''
20 print ''.join(traceback.format_exception(*sys.exc_info()))
c7f483d @willkg [bug 1116489] Tweak ImportError message in manage.py
willkg authored Sep 29, 2015
21 if 'VIRTUAL_ENV' in os.environ:
22 print 'Have you installed requirements? Are they up-to-date?'
23 else:
24 print 'Have you activated your virtual environment?'
67b8948 @willkg [bug 1116489] Tweak manage.py to be more helpful on errors
willkg authored Sep 26, 2015
25 sys.exit(1)
58541af @willkg [bug 1056298] Fix createsuperuser
willkg authored Dec 1, 2014
26
5a16755 @rlr Revert "[Bug 750247] Use dictConfig logging configuration"
rlr authored Oct 4, 2012
27 # Import for side-effect: configures our logging handlers.
123925f @mythmon Fix lint errors.
authored Apr 9, 2015
28 from kitsune import log_settings # noqa
5a16755 @rlr Revert "[Bug 750247] Use dictConfig logging configuration"
rlr authored Oct 4, 2012
29
e3f86da django skeleton
James Socol authored Feb 3, 2010
30 if __name__ == "__main__":
248dae0 @rlr [bug 963088] Fix deprecation warnings in manage.py
rlr authored Jan 23, 2014
31 from django.core.management import execute_from_command_line
32 execute_from_command_line(sys.argv)
Something went wrong with that request. Please try again.