mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 14:01:56 +08:00
Fix Feed.get_object signature (#798)
get_object's default implementation returns None but subclasses are allowed to override this method and make it return anything. The returned object would then be passed to other methods to publish different data for different URL parameters. https://docs.djangoproject.com/en/4.0/ref/contrib/syndication/
This commit is contained in:
@@ -22,6 +22,6 @@ class Feed:
|
||||
def item_enclosures(self, item: Model) -> List[Enclosure]: ...
|
||||
def feed_extra_kwargs(self, obj: None) -> Dict[Any, Any]: ...
|
||||
def item_extra_kwargs(self, item: Model) -> Dict[Any, Any]: ...
|
||||
def get_object(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> None: ...
|
||||
def get_object(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: ...
|
||||
def get_feed(self, obj: None, request: WSGIRequest) -> SyndicationFeed: ...
|
||||
|
||||
Reference in New Issue
Block a user