If the renderer name contain a dot then pyramid will use the extension to get the renderer. So you can create a "schema" renderer and use it with something like:
@view_config(renderer='your.module.UserOutputSchema.schema') Then resolve the dotted name to get the class and instanciate your schema in the renderer. This will work iif schemas do not require any arguments (I don't now how marshmallow work) On Saturday, June 6, 2015 at 10:09:37 PM UTC+2, Jonathan Vanasco wrote: > > what if you did something like: > > 1. define a custom renderer `render_marshmallow` that just does json on > the columns (not relationships) unless you already... > 2. define a request property of `render_marshmallow_schema` > 3. have your views define `request.render_marshmallow_schema ` (unless > there's a way to register that with the view_config, i couldn't find it) > > this way you have one renderer, but the views register a schema for it. > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.