Signals from BaseView
The lback.views.base_view.BaseView class, serving as the foundation for all view handlers, emits signals throughout its request dispatching process. These signals offer valuable insights into the lifecycle of a request within a view and enable you to execute custom logic at pivotal moments.
Signal Name |
Description |
Arguments (kwargs) |
|---|---|---|
|
Emitted at the very beginning of the |
|
|
Emitted when the HTTP request method is not permitted by the |
|
|
Emitted when the view technically allows a specific HTTP method but lacks a corresponding callable handler method (e.g., a “GET” request is permitted, but no |
|
|
Emitted after a view’s method handler (e.g., |
|
Signals from APIDocs
The lback.api.docs.APIDocs class, which handles the generation of OpenAPI (Swagger) documentation, emits signals at various key points throughout its documentation process. These signals offer powerful hooks for monitoring, extending, or deeply customizing how your API documentation is generated and integrated.
Signal Name |
Description |
Arguments (kwargs) |
|---|---|---|
|
Emitted right after the |
|
|
Emitted just as the |
|
|
Emitted once the |
|
|
Emitted each time a specific route’s HTTP methods are successfully inspected and documented for the OpenAPI specification. |
|
|
Emitted when a route cannot be documented. This is typically due to issues like missing HTTP methods on its associated view class, or if no callable handlers are found for the declared methods. |
|
|
Emitted after the complete OpenAPI specification dictionary (the final Swagger JSON structure) has been successfully assembled. |
|
|
Emitted just before a |
|
|
Emitted after a serializer’s schema has been fully generated and successfully added to the OpenAPI components section. |
|
Signals from BaseModelSerializer
The lback.api.serializer.BaseModelSerializer class, a foundational component for data serialization and validation within the framework, emits a comprehensive range of signals throughout its operational lifecycle. These signals are incredibly valuable, offering powerful extension points for auditing data operations, integrating with other parts of your application, or implementing custom logic at critical serialization and validation stages.
Signal Name |
Description |
Arguments (kwargs) |
|---|---|---|
|
Emitted immediately after a serializer instance has been fully initialized and is ready for use. |
|
|
Emitted just before the serialization process commences. This is the stage where a model instance (or instances) is about to be transformed into its dictionary representation. |
|
|
Emitted immediately after the serialization process has successfully completed, and the dictionary representation of the data is now fully available. |
|
|
Emitted precisely when the validation process begins. This is the stage where raw input data is being processed and checked for correctness, prior to being converted into a clean, validated dictionary. Sensitive data like passwords will be masked within ``raw_data`` for security. |
|
|
Emitted when the entire validation process successfully finishes, providing the cleaned, type-converted, and fully validated data. |
|
|
Emitted when the validation process encounters one or more errors. This signal provides details about the validation failures. |
|
|
Emitted just before a new model instance is created or an existing one is updated in the database, using the data that has already been validated by the serializer. Sensitive data like passwords will be masked within ``validated_data`` for security. |
|
|
Emitted immediately after a model instance has been successfully either created or updated in the database. |
|