Merge pull request #258 from pdvyas/wsgi

fixes
This commit is contained in:
Rushabh Mehta 2013-09-16 23:30:49 -07:00
commit b48aa2c587
2 changed files with 8 additions and 5 deletions

View file

@ -4,6 +4,7 @@ sys.path.extend(["..", "../app", "../lib"])
from werkzeug.wrappers import Request, Response
from werkzeug.local import LocalManager
from werkzeug.wsgi import SharedDataMiddleware
import mimetypes
import webnotes
@ -37,11 +38,15 @@ def application(request):
application = local_manager.make_middleware(application)
application = SharedDataMiddleware(application, {
'/': os.path.join(os.path.dirname(__file__), "..", "..", "public")
})
if __name__ == '__main__':
import sys
from werkzeug.serving import run_simple
run_simple('localhost', 8000, application, use_reloader=True,
use_debugger=True, use_evalex=True, static_files = {
"/": os.path.join(os.path.dirname(__file__), "..", "..", "public")
})
use_debugger=True, use_evalex=True)

View file

@ -156,8 +156,6 @@ def print_json():
import json
print webnotes.response
print_zip(json.dumps(webnotes.local.response, default=json_handler, separators=(',',':')))
def print_csv():