Michael Merickel
2016-04-28 8eb20f923e2013c7d6c3744ad629aa1b2e2f8e3f
fix bugs in design defense code examples

fixes #2287
1 files modified
12 ■■■■ changed files
docs/designdefense.rst 12 ●●●● patch | view | raw | blame | history
docs/designdefense.rst
@@ -1295,12 +1295,12 @@
    from groundhog import Groundhog
    app = Groundhog('myapp', 'seekrit')
    app.route('/admin')
    @app.route('/admin')
    def admin():
        return '<html>admin page</html>'
    app.route('/:action')
    def action():
    @app.route('/:action')
    def do_action(action):
        if action == 'add':
           return '<html>add</html>'
        if action == 'delete':
@@ -1320,15 +1320,15 @@
    from groundhog import Groundhog
    app = Groundhog('myapp', 'seekrit')
    app.route('/:action')
    def action():
    @app.route('/:action')
    def do_action(action):
        if action == 'add':
           return '<html>add</html>'
        if action == 'delete':
           return '<html>delete</html>'
        return app.abort(404)
    app.route('/admin')
    @app.route('/admin')
    def admin():
        return '<html>admin page</html>'