django-content-settings
django-content-settings copied to clipboard
`additional_attributes` for `DjangoModelTemplate`
The idea here is that customer can pass additional arguments to the function call, which will be passed to the template context.
Those attributes are optional, and if those haven't been passed, that means that they should be calculated based on primary model object.
DjangoModelTemplate(
additional_attributes={
"final_quest": lambda obj: get_final_quest()
}
)
In the context it still one object, but with proxy cover, where attributes will be taken from the passed