root/werkzeug-debugged.py

Revision 978:a442659b270f, 0.6 kB (checked in by Alexander Solovyov <[email protected]…>, 19 months ago)

werkzeug starting script slightly upgraded

  • Property exe set to *
Line  
1 #!/usr/bin/env python
2 import os
3 import sys
4
5 from werkzeug import run_simple, DebuggedApplication
6 from django.views import debug
7 from django.core.handlers.wsgi import WSGIHandler
8
9 def null_technical_500_response(request, exc_type, exc_value, tb):
10     raise exc_type, exc_value, tb
11 debug.technical_500_response = null_technical_500_response
12
13 os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
14
15 if __name__ == '__main__':
16     try:
17         port = int(sys.argv[1])
18     except (ValueError, IndexError):
19         port = 8000
20     run_simple('0.0.0.0', port, DebuggedApplication(WSGIHandler(), True), True)
Note: See TracBrowser for help on using the browser.