This small change fixes a bug where the call to the Renderer constructor fails when one or more optional kwargs are specified. The base class constructor didn't have a '**kwargs' parameter, but the RegisterRenderer constructor still passes optional keywords through to the superclass constructor. I have also added the code to update the _template_context dict from the kwargs.
This fix is necessary to enable something like a register search without subclassing RegisterRenderer (as has been done in VocPrez with the SkosRegisterRenderer class). The bug showed up when I tried to implement a search in the Placenames register, which uses a RegisterRenderer object.
I've also changed the cosmetic layout of the function parameters to place them one per line, just for readability.
Feel free to squash the commits - I should have done it in a single commit, anyway.
G'day Nick & Edmond...
This small change fixes a bug where the call to the Renderer constructor fails when one or more optional kwargs are specified. The base class constructor didn't have a '**kwargs' parameter, but the RegisterRenderer constructor still passes optional keywords through to the superclass constructor. I have also added the code to update the _template_context dict from the kwargs.
This fix is necessary to enable something like a register search without subclassing RegisterRenderer (as has been done in VocPrez with the SkosRegisterRenderer class). The bug showed up when I tried to implement a search in the Placenames register, which uses a RegisterRenderer object.
I've also changed the cosmetic layout of the function parameters to place them one per line, just for readability.
Feel free to squash the commits - I should have done it in a single commit, anyway.
Cheers,
Alex