|
|
@ -19,12 +19,12 @@ def filter_plugins(region_contents, model): |
|
|
|
{{ regions|region_conents:"article"|filter_plugins:"projects.ContributorProjectPlugin" }} |
|
|
|
{{ regions|region_conents:"article"|filter_plugins:"projects.ContributorProjectPlugin" }} |
|
|
|
|
|
|
|
|
|
|
|
""" |
|
|
|
""" |
|
|
|
if type(model) == str: |
|
|
|
if isinstance(model, str): |
|
|
|
model = registry.apps.get_model(model) |
|
|
|
model = registry.apps.get_model(model) |
|
|
|
|
|
|
|
|
|
|
|
return [plugin.object |
|
|
|
return [plugin.object |
|
|
|
for plugin in region_contents |
|
|
|
for plugin in region_contents |
|
|
|
if type(plugin) == model] |
|
|
|
if isinstance(plugin, model)] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@register.filter |
|
|
|
@register.filter |
|
|
|