badfrog a écrit :
> customer.py:
> ---
> from turbogears import controllers, expose, flash
>
> class Customer(controllers.Controller):
>     @expose(template="w00tztest.templates.customer_search")
>     def index(self):
>         return self.find("all")
>
>       @expose(template="w00tztest.templates.customer_search")
>       def find(self, search):
>               customers =
> w00tztest.model.Customer.select(orderBy=w00tztest.model.Customer.q.lastName)
>               return dict(search=search, customers=customers)
>
>   
[...]
> File "customer.py", line 11, in index
>     return self.find("all")
> AttributeError: 'Customer' object has no attribute 'find'
>   

Normal. Your Customer class does not have a find method.
You whoudl re-indent to find function to the left in order to make sure 
it becomes a method of Customer. For the moment it is a simple function 
inside the index method.

Florent.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to