[FIX] fixed ta controller parameter in wrong patch

This commit is contained in:
Xavier Morel 2014-02-07 15:10:05 +01:00
parent be1fe080c9
commit 290883ab2f
2 changed files with 5 additions and 16 deletions

View File

@ -1,18 +1,6 @@
# HG changeset patch
# Parent 8129831c739fb22d1f6fbccdc6f453f6a0a9e24f
# Parent 48c349d1df4e975b47b34afbbb527f023f4f7ca0
diff --git a/controllers/my_controller.py b/controllers/my_controller.py
--- a/controllers/my_controller.py
+++ b/controllers/my_controller.py
@@ -13,7 +13,7 @@ class my_controller(main.Home):
})
@http.route('/tas/<model("academy.tas"):ta>/', auth='public', website=True)
- def ta(self, id):
+ def ta(self, ta):
return http.request.website.render('academy.ta', {
'ta': ta,
})
diff --git a/views/templates.xml b/views/templates.xml
--- a/views/templates.xml
+++ b/views/templates.xml

View File

@ -1,5 +1,5 @@
# HG changeset patch
# Parent fa3e25d0315e54de4bd983ad8532044b5e2df233
# Parent 548ab57454752e9575323e26d0471669c78172f6
diff --git a/controllers/my_controller.py b/controllers/my_controller.py
--- a/controllers/my_controller.py
@ -9,9 +9,10 @@ diff --git a/controllers/my_controller.py b/controllers/my_controller.py
})
- @http.route('/tas/<int:id>/', auth='public', website=True)
+ @http.route('/tas/<model("academy.tas"):ta>/', auth='public', website=True)
def ta(self, id):
- def ta(self, id):
- return http.request.website.render('academy.ta', teaching_assistants[id])
+ @http.route('/tas/<model("academy.tas"):ta>/', auth='public', website=True)
+ def ta(self, ta):
+ return http.request.website.render('academy.ta', {
+ 'ta': ta,
+ })