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]
You should return a dictionary not a list.
rval = {'values': [1,2,4]}
On Sun, Dec 4, 2011 at 5:34 PM, Jonathan Vanasco jonat...@findmeon.comwrote:
i'm using pyramid with akhet
according to the docs, i should be able to do something like this:
@view_config(renderer='json')
def
I don't think that's it (Pyramid will serialize a list just fine). But
I don't have any other theory.
- C
On Sun, 2011-12-04 at 18:08 -0600, John Anderson wrote:
You should return a dictionary not a list.
rval = {'values': [1,2,4]}
On Sun, Dec 4, 2011 at 5:34 PM, Jonathan Vanasco
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
dicts and lists don't work. i posted a list to the group, because its
the simplest object.
On Dec 4, 7:08 pm, John Anderson son...@gmail.com wrote:
You should return a dictionary not a list.
rval = {'values': [1,2,4]}
On Sun, Dec 4, 2011 at 5:34 PM, Jonathan Vanasco
so you sort of solved this. you at least pointed me in the right
direction to experiment!
works:
@action(renderer='json')
doesn't work:
@view_config(renderer='json')
On Dec 4, 8:11 pm, Mike Orr sluggos...@gmail.com wrote:
I don't think so, but akhet does use pyramid_handlers, so
On Dec 4, 8:11 pm, Mike Orr sluggos...@gmail.com wrote:
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.
Sigh. I do like the scaffold. It's mostly going to be replaced with
On Sun, Dec 4, 2011 at 5:25 PM, Jonathan Vanasco jonat...@findmeon.com wrote:
Is akhet2 on your bitbucket ? i've been planning on making a sample
application that is mostly docs/reference of different ways to do
things in pyramid - i'm trying to teach a few former colleagues it,
and it would