summaryrefslogtreecommitdiff
path: root/docs/designdefense.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/designdefense.rst')
-rw-r--r--docs/designdefense.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/designdefense.rst b/docs/designdefense.rst
index 3c1046b82..70dbbe720 100644
--- a/docs/designdefense.rst
+++ b/docs/designdefense.rst
@@ -1297,12 +1297,12 @@ Consider the following simple `Groundhog
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':
@@ -1322,15 +1322,15 @@ order of the function definitions in the file?
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>'