What's Changed
🚨 Breaking changes 🚨
Component
class is no longer a subclass ofView
. To configure theView
class, set theComponent.View
nested class. HTTP methods likeget
orpost
can still be defined directly onComponent
class, andComponent.as_view()
internally callsComponent.View.as_view()
. (See Modifying the View class)
Feat
-
The inputs (args, kwargs, slots, context, ...) that you pass to
Component.render()
can be accessed from withinget_context_data
,get_template_string
andget_template_name
viaself.input
. (See Accessing data passed to the component) -
Typing:
Component
class supports generics that specify types forComponent.render
(See Adding type hints with Generics)
Full Changelog: 0.91...0.92