Add BaseDetailView.object (#1211)

This commit is contained in:
Adam Johnson
2022-10-27 19:32:08 +01:00
committed by GitHub
parent 85ae4bb704
commit ae5af12c9b

View File

@@ -20,6 +20,7 @@ class SingleObjectMixin(Generic[_M], ContextMixin):
def get_context_object_name(self, obj: _M) -> Optional[str]: ... def get_context_object_name(self, obj: _M) -> Optional[str]: ...
class BaseDetailView(SingleObjectMixin[_M], View): class BaseDetailView(SingleObjectMixin[_M], View):
object: _M
def get(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ... def get(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
class SingleObjectTemplateResponseMixin(TemplateResponseMixin): class SingleObjectTemplateResponseMixin(TemplateResponseMixin):