Skip to content

Instantly share code, notes, and snippets.

@arnar
Created October 5, 2012 09:06
Show Gist options
  • Save arnar/3838851 to your computer and use it in GitHub Desktop.
Save arnar/3838851 to your computer and use it in GitHub Desktop.
pyramid_debugtoolbar and requirejs conflict
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
def main(request):
return Response('''
<html>
<head>
<script src="http://requirejs.org/docs/release/2.1.0/minified/require.js"></script>
</head>
<body>
<p>Hello</p>
</body>
</html>
''')
if __name__ == '__main__':
config = Configurator()
config.include('pyramid_debugtoolbar')
config.add_route('main', '/')
config.add_view(main, route_name='main')
app = config.make_wsgi_app()
server = make_server('0.0.0.0', 8080, app)
server.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment