Django
Classes¶
WireupSettings
dataclass
¶
Class containing Wireup settings specific to Django.
Attributes¶
auto_inject_views = True
class-attribute
instance-attribute
¶
Whether to automatically inject dependencies into Django views.
When True (default), Wireup will automatically inject dependencies into all Django views. When False, you must use the @inject decorator explicitly on views that need injection.
Set this to False if you want to use @inject explicitly across all views (useful when mixing core Django views with third-party views like Django REST framework).
injectables = None
class-attribute
instance-attribute
¶
List of modules containing wireup injectable registrations.
service_modules = None
class-attribute
instance-attribute
¶
List of modules containing wireup injectable registrations.
Functions¶
get_app_container()
¶
Return the container instance associated with the current django application.
get_request_container()
¶
When inside a request, returns the scoped container instance handling the current request.