Browse Source

[minor] do not serve statics if NO_STATICS in environ

version-14
Pratik Vyas 11 years ago
committed by Anand Doshi
parent
commit
c5d2009948
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      webnotes/app.py

+ 5
- 4
webnotes/app.py View File

@@ -72,6 +72,11 @@ def application(request):

application = local_manager.make_middleware(application)

if not os.environ.get('NO_STATICS'):
application = StaticDataMiddleware(application, {
'/': 'public',
})

def serve(port=8000, profile=False):
webnotes.validate_versions()
global application
@@ -80,9 +85,5 @@ def serve(port=8000, profile=False):
if profile:
application = ProfilerMiddleware(application)

application = StaticDataMiddleware(application, {
'/': 'public',
})

run_simple('0.0.0.0', int(port), application, use_reloader=True,
use_debugger=True, use_evalex=True)

Loading…
Cancel
Save