Closed multimeric closed 3 years ago
For example, this lets you do:
class TestResource(ResourceDetail): """ This fake resource always renders a constructor parameter """ def __init__(self, *args, **kwargs): super().__init__() self.constant = kwargs.get('constant') def get(self): return self.constant api.route(TestResource, 'resource_kwargs', '/resource_kwargs', resource_kwargs={ 'constant': 'hello!' })
Basically this is helpful if you ever want to fully customize a resource object.
Coverage increased (+0.01%) to 90.786% when pulling 3de105d0dfef7e7f10384a15b8599b0968ba0e3c on TMiguelT:resource_init_args into b44bc08b11213d49fadae873650d3555889052ec on miLibris:master.
For example, this lets you do:
Basically this is helpful if you ever want to fully customize a resource object.