Last active
August 29, 2015 14:09
-
-
Save RonnyPfannschmidt/a562431ab32f702ac2cd to your computer and use it in GitHub Desktop.
the app thats failing me
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <h1> stuff</h1> | |
| </body> | |
| </html> |
This file contains hidden or 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
| from more.static import StaticApp | |
| import bowerstatic | |
| from os.path import abspath, dirname, join | |
| root = dirname(dirname(abspath(__file__))) | |
| print root | |
| bower = bowerstatic.Bower( ) | |
| components = bower.components( | |
| 'mybox', join(root, 'bower_components')) | |
| class App(StaticApp): | |
| pass | |
| @App.static_components() | |
| def get_static(): | |
| return components | |
| @App.path(path='') | |
| class Root(object): | |
| pass | |
| @App.html(model=Root) | |
| def hello(self, request): | |
| request.include('jquery') | |
| with open(join(root, 'static/index.html')) as fp: | |
| return fp.read() | |
This file contains hidden or 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 morepath | |
| from werkzeug import serving | |
| import mybox | |
| #XXX: evil | |
| if __name__ == '__main__': | |
| config = morepath.setup() | |
| config.scan(mybox) | |
| config.commit() | |
| serving.run_simple('localhost', 5000, mybox.App(), | |
| use_debugger=True, use_reloader=True) |
This file contains hidden or 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
| WebOb==1.4 | |
| Werkzeug==0.9.6 | |
| bowerstatic==0.7 | |
| execnet==1.2.0 | |
| flake8==2.2.5 | |
| invoke==0.9.0 | |
| mccabe==0.2.1 | |
| more.static==0.6 | |
| morepath==0.8 | |
| pep8==1.5.7 | |
| py==1.4.26 | |
| pyflakes==0.8.1 | |
| pytest==2.6.4 | |
| pytest-cache==1.0 | |
| reg==0.9.2 | |
| repoze.lru==0.6 | |
| venusifork==2.0a2 | |
| wsgiref==0.1.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment