Last active
March 7, 2018 03:01
-
-
Save DTAIEB/8af57bc159a73999461897b58ff10a39 to your computer and use it in GitHub Desktop.
Shows how PixieDebugger can help debug PixieApps
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
from pixiedust.display.app import * | |
@PixieApp | |
class TestApp(): | |
@route() | |
def main_screen(self): | |
return """ | |
<button type="submit" pd_options="badroute=true" pd_target="target{{prefix}}"> | |
Call bad Route | |
</button> | |
<div id="target{{prefix}}"></div> | |
""" | |
@route(badroute="*") | |
def bad_route(self): | |
str = "some string" | |
self.bad_method() | |
return "<div>Bad code</div>" | |
def bad_method(self): | |
var = 3/0 | |
app = TestApp() | |
app.run(debug_route="bad_route") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment