Created
March 26, 2012 23:08
-
-
Save sgammon/2210470 to your computer and use it in GitHub Desktop.
the magic fix for the dev server's bullshit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
if 'lib' not in sys.path: | |
# Add lib as primary libraries directory, with fallback to lib/dist | |
# and optionally to lib/dist.zip, loaded using zipimport. | |
sys.path[0:0] = ['lib', 'lib/dist', 'lib/dist.zip'] | |
class AppBootstrapper(object): | |
@classmethod | |
def prepareImports(cls): | |
if 'lib' not in sys.path: | |
sys.path[0:0] = ['lib', 'lib/dist', 'lib/dist.zip'] | |
from webapp2 import RequestHandler | |
from webapp2 import WSGIApplication | |
from google.appengine.ext import webapp | |
webapp.RequestHandler = RequestHandler | |
webapp.WSGIApplication = WSGIApplication | |
return cls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment