Em Quarta 19 Abril 2006 08:33, [EMAIL PROTECTED] escreveu:

> AssertionError: Method Root.dg() returned unexpected output. Output
> should be of type basestring, dict or generator.

You're returning None from an expose()d method.  If you really want to return 
nothing from it, add "return dict()" as the last line of it.


> class Root(controllers.RootController):
>     @turbogears.expose()
>     def dg(self):
>         grid = DataGrid(fields=[
>             ('ID', 'userId'),
>             ('Name', 'displayName'),
>             ('E-mail', 'emailAddress'),
>         ])
>         users = [User(1, 'john', '[EMAIL PROTECTED]'), User(2, 'fred',
> '[EMAIL PROTECTED]')]
>         grid.display(users)
      return dict()  # <-- here

-- 
Jorge Godoy      <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to