class GroupActionsAPIView(djburger.ViewBase): csrf_exempt = True rules = { 'get': djburger.rule( controller=controllers.GroupController.info, postvalidator=djburger.validators.constructors.ModelInstance, renderer=djburger.renderers.JSON(), ), 'patch': djburger.rule( prevalidator=validators.GroupInputValidator, controller=controllers.GroupController.edit, postvalidator=djburger.validators.constructors.ModelInstance, renderer=djburger.renderers.JSON(), ), 'post': 'patch', 'delete': djburger.rule( controller=controllers.GroupController.delete, postvalidator=djburger.validators.constructors.IsInt, renderer=djburger.renderers.JSON(), ), }
class IndexView(djburger.ViewBase): rules = { 'get': djburger.rule( c=lambda request, data, **kwargs: 'Hello, World!', r=djburger.r.Template(template_name='index.html'), ), }
class AuthAPIView(djburger.ViewBase): csrf_exempt = True default_rule = djburger.rule( prev=AuthenticationForm, c=controllers.UserController.auth, postv=djburger.v.c.IsBool, r=djburger.r.JSON(), )
class AuthAPIView(djburger.ViewBase): csrf_exempt = True default_rule = djburger.rule( prevalidator=AuthenticationForm, controller=controllers.UserController.auth, postvalidator=djburger.validators.constructors.IsBool, renderer=djburger.renderers.JSON(), )
class GroupCommonAPIView(djburger.ViewBase): csrf_exempt = True rules = { 'get': djburger.rule( controller=controllers.GroupController.list, postvalidator=djburger.validators.constructors.QuerySet, renderer=djburger.renderers.JSON(), ), 'post': djburger.rule( prevalidator=validators.GroupInputValidator, controller=controllers.GroupController.add, postvalidator=djburger.validators.constructors.ModelInstance, renderer=djburger.renderers.JSON(), ), 'put': 'post', }
class GroupCommonAPIView(djburger.ViewBase): csrf_exempt = True rules = { 'get': djburger.rule( c=controllers.GroupController.list, postv=djburger.v.c.QuerySet, r=djburger.r.JSON(), ), 'post': djburger.rule( prev=validators.GroupInputValidator, c=controllers.GroupController.add, postv=djburger.v.c.ModelInstance, r=djburger.r.JSON(), ), 'put': 'post', }
class Base(djburger.ViewBase): default_rule = djburger.rule( c=lambda request, data, **kwargs: data, postv=Validator, r=lambda **kwargs: kwargs, )
class Base(djburger.ViewBase): default_rule = djburger.rule( c=lambda request, data, **kwargs: data, r=lambda data, **kwargs: data, )
class Base(djburger.ViewBase): default_rule = djburger.rule( controller=lambda request, data, **kwargs: data, postvalidator=Validator, renderer=lambda **kwargs: kwargs, )
class Base(djburger.ViewBase): default_rule = djburger.rule( parser=djburger.parsers.DictMixed(), controller=lambda request, data, **kwargs: data, renderer=lambda data, **kwargs: data, )