app.blueprints.roles

Description

Classes

NewRoleResource([api])

RoleBaseResource([api])

RoleResource([api])

RolesSearchResource([api])

class app.blueprints.roles.NewRoleResource(api=None, *args, **kwargs)
classmethod as_view(name: str, *class_args: Any, **class_kwargs: Any) Callable

Converts the class into an actual view function that can be used with the routing system. Internally this generates a function on the fly which will instantiate the View on each request and call the dispatch_request() method on it.

The arguments passed to as_view() are forwarded to the constructor of the class.

decorators: List[Callable] = []

The canonical way to decorate class-based views is to decorate the return value of as_view(). However since this moves parts of the logic from the class declaration to the place where it’s hooked into the routing system.

You can place one or more decorators in this list and whenever the view function is created the result is automatically decorated.

New in version 0.8.

dispatch_request(*args, **kwargs)

Subclasses have to override this method to implement the actual view function code. This method is called with all the arguments from the URL rule.

method_decorators = []
methods: Optional[List[str]] = {'POST'}

A list of methods this view can handle.

post() tuple
provide_automatic_options: Optional[bool] = None

Setting this disables or force-enables the automatic options handling.

representations = None
role_serializer = <RoleSerializer(many=False)>
role_service = <app.services.role.RoleService object>
validate_payload(func)

Perform a payload validation on expected model if necessary

class app.blueprints.roles.RoleBaseResource(api=None, *args, **kwargs)
classmethod as_view(name: str, *class_args: Any, **class_kwargs: Any) Callable

Converts the class into an actual view function that can be used with the routing system. Internally this generates a function on the fly which will instantiate the View on each request and call the dispatch_request() method on it.

The arguments passed to as_view() are forwarded to the constructor of the class.

decorators: List[Callable] = []

The canonical way to decorate class-based views is to decorate the return value of as_view(). However since this moves parts of the logic from the class declaration to the place where it’s hooked into the routing system.

You can place one or more decorators in this list and whenever the view function is created the result is automatically decorated.

New in version 0.8.

dispatch_request(*args, **kwargs)

Subclasses have to override this method to implement the actual view function code. This method is called with all the arguments from the URL rule.

method_decorators = []
methods: Optional[List[str]] = None

A list of methods this view can handle.

provide_automatic_options: Optional[bool] = None

Setting this disables or force-enables the automatic options handling.

representations = None
role_serializer = <RoleSerializer(many=False)>
role_service = <app.services.role.RoleService object>
validate_payload(func)

Perform a payload validation on expected model if necessary

class app.blueprints.roles.RoleResource(api=None, *args, **kwargs)
classmethod as_view(name: str, *class_args: Any, **class_kwargs: Any) Callable

Converts the class into an actual view function that can be used with the routing system. Internally this generates a function on the fly which will instantiate the View on each request and call the dispatch_request() method on it.

The arguments passed to as_view() are forwarded to the constructor of the class.

decorators: List[Callable] = []

The canonical way to decorate class-based views is to decorate the return value of as_view(). However since this moves parts of the logic from the class declaration to the place where it’s hooked into the routing system.

You can place one or more decorators in this list and whenever the view function is created the result is automatically decorated.

New in version 0.8.

delete(role_id: int) tuple
dispatch_request(*args, **kwargs)

Subclasses have to override this method to implement the actual view function code. This method is called with all the arguments from the URL rule.

get(role_id: int) tuple
method_decorators = []
methods: Optional[List[str]] = {'DELETE', 'GET', 'PUT'}

A list of methods this view can handle.

provide_automatic_options: Optional[bool] = None

Setting this disables or force-enables the automatic options handling.

put(role_id: int) tuple
representations = None
role_serializer = <RoleSerializer(many=False)>
role_service = <app.services.role.RoleService object>
validate_payload(func)

Perform a payload validation on expected model if necessary

class app.blueprints.roles.RolesSearchResource(api=None, *args, **kwargs)
classmethod as_view(name: str, *class_args: Any, **class_kwargs: Any) Callable

Converts the class into an actual view function that can be used with the routing system. Internally this generates a function on the fly which will instantiate the View on each request and call the dispatch_request() method on it.

The arguments passed to as_view() are forwarded to the constructor of the class.

decorators: List[Callable] = []

The canonical way to decorate class-based views is to decorate the return value of as_view(). However since this moves parts of the logic from the class declaration to the place where it’s hooked into the routing system.

You can place one or more decorators in this list and whenever the view function is created the result is automatically decorated.

New in version 0.8.

dispatch_request(*args, **kwargs)

Subclasses have to override this method to implement the actual view function code. This method is called with all the arguments from the URL rule.

method_decorators = []
methods: Optional[List[str]] = {'POST'}

A list of methods this view can handle.

post() tuple
provide_automatic_options: Optional[bool] = None

Setting this disables or force-enables the automatic options handling.

representations = None
role_serializer = <RoleSerializer(many=False)>
role_service = <app.services.role.RoleService object>
validate_payload(func)

Perform a payload validation on expected model if necessary