-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Initially webu/dalec-discourse#6
Sometime we want ton configure the child dalec according to specific API logic. In the example above it is the action "on behalf" of someone.
However, we want something generic: an ability to pass arbitrary kwargs to the proxy.
It should live somewhere in the
def refresh(
self,
content_type: str,
channel: Optional[str] = None,
channel_object: Optional[str] = None,
generic_kwargs: [Optional[dic]] = None, # <- here! or elsewhere in the signature...
force: Optional[bool] = False,
dj_channel_obj: Optional[Model] = None,
) -> Union[Tuple[int, int, int], Tuple[Literal[False], Literal[False], Literal[False]]]:
"""
Fetch updated contents from the source and update/create it into the DB.
Then, if some contents has been created, delete oldests contents which are not anymore
required
returns number of created, updated and deleted objects or False if cache not yet expired
"""
dalec_kwargs = {
"content_type": content_type,
"channel": channel,
"channel_object": channel_object,
"generic_kwargs": generic_kwargs # <- here!
}And accordingly in JS / HTML.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request