On Sun, Dec 4, 2011 at 3:34 PM, Jonathan Vanasco <jonat...@findmeon.com> wrote: > i'm using pyramid with akhet > > according to the docs, i should be able to do something like this: > > @view_config(renderer='json') > def login_status(self): > rval= [1,2,4] > return rval > > That creates an error for me: > ValueError: Could not convert view return value "[1, 2, 4]" into a > response object > > is there something in the akhet config that disabled the ability to > handle json like the normal docs ?
I don't think so, but akhet does use pyramid_handlers, so it's attuned to @action rather than @view_config. Still, I doubt that would sabotage @view_config. Do you have a config.scan() line in your init file? If not, it's possible that config.add_handler() is registering the view but misinterpreting the view options. There may be problems with mixing add_handler and @view_config in the same view class. If you don't have config.scan() and config.add_handler() is not registering the view, then I don't see how the view would be accessible at all. By the way, I'm working on Akhet 2 which will not have an application scaffold, but expanded docs instead. So the days of the 'akhet' scaffold are numbered. For the person on IRC (NotreDev) who asked about Transaction documentation, Akhet has a page on it: http://docs.pylonsproject.org/projects/akhet/en/latest/transaction_manager.html -- Mike Orr <sluggos...@gmail.com> -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.