Yes, I have import json at the top. And, no, I'm not using anything called
JSON. I think I found the class I'm trying to call in
here: https://github.com/Pylons/pyramid/blob/master/pyramid/renderers.py
So how can I import that class?
On Monday, June 4, 2012 3:51:32 PM UTC-5, Michael Merickel wrote:
>
> so you are "importing json" via "import json" ?
> and you are using some other thing called "JSON" ?
>
> On Mon, Jun 4, 2012 at 3:42 PM, Zak wrote:
> > I'm trying to create a custom renderer like this:
> >
> > config = Configurator(settings=settings)
> >
> > config.add_renderer('json_with_custom_default',
> > JSON(default=json_util.default))
> >
> >
> > But I keep getting an error "global named 'JSON' is not defined" even
> though
> > I am importing json. What am I doing wrong?
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "pylons-discuss" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/pylons-discuss/-/7CHOGDL4IU8J.
> > 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/pylons-discuss?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pylons-discuss/-/qfs9UperCpUJ.
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/pylons-discuss?hl=en.