News Managers
Abstract News Manager
- class integreat_cms.news_managers.abstract_news_manager.AbstractNewsManager[source]
Bases:
ABC- abstract collect_news_items(region_slug: str, language_slug: str, channel: str) list[NewsItem][source]
Returns news items imported from the source
To be implemented in the inheriting model
- abstract import_news_items() None[source]
Imports news items from the source
To be implemented in the inheriting model
- Return type:
None
- class integreat_cms.news_managers.abstract_news_manager.NewsItem[source]
Bases:
TypedDict- fromkeys(value=None, /)[source]
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)[source]
Return the value for key if key is in the dictionary, else default.
- pop(k[, d]) v, remove specified key and return the corresponding value.[source]
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()[source]
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)[source]
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
Pushnews Manager
- class integreat_cms.news_managers.pushnews_manager.PushnewsManager[source]
Bases:
AbstractNewsManager- collect_news_items(region_slug: str, language_slug: str, channel: str) list[NewsItem][source]
Returns push notification news
- import_news_items() None[source]
Push notifications live in our own database, so there is nothing to import.
- Return type:
None
Registry
Registry of the available news source managers.
Tunews Manager
- class integreat_cms.news_managers.tunews_manager.TunewsManager[source]
Bases:
AbstractNewsManager- collect_news_items(region_slug: str, language_slug: str, _channel: str) list[NewsItem][source]
Returns Tü News posts