Hi,
> […] then it dident work […]
first of all, a single "this does not work" is absolutely useless. Nobody will
or even *can* help you without any information.
Indeed this article addresses bug reports but applys for generic problems like
this one as well:
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
You're posts slightly getting better but often still lack important
information so please try to provide more of them in the first place in the
future.
> TypeError: get() takes exactly 1 argument (2 given)
As you can clearly see from the exception's message, your get method in the
Produit class (as far as routing works properly) is called with two arguments
instead of one parameter. This second one comes from your regular expression
of the URL. The URLSpec documentation¹ says:
| […] Any groups in the regex will be passed in to the handler's get/post/etc
| methods as arguments […]
So either remove the parentheses from the regex (this is *not* what you want)
or let the get method also have a product ID parameter (take this approach):
class Produit(BaseHandler):
def get(self, product_id):
// ... do sth. with the product_id
Regards,
Lyse
¹:
http://www.tornadoweb.org/documentation/web.html#tornado.web.URLSpec