reworked MergeMixin to handle non-trees

This commit is contained in:
smilerz
2021-09-06 10:20:43 -05:00
parent f12558951a
commit 7053a857c2
13 changed files with 230 additions and 43 deletions

View File

@@ -133,3 +133,20 @@ def food(request):
}
}
)
@group_required('user')
def unit(request):
# recipe-param is the name of the parameters used when filtering recipes by this attribute
# model-name is the models.js name of the model, probably ALL-CAPS
return render(
request,
'generic/model_template.html',
{
"title": _("Units"),
"config": {
'model': "UNIT", # *REQUIRED* name of the model in models.js
# 'recipe_param': 'units' # *OPTIONAL* name of the listRecipes parameter if filtering on this attribute
}
}
)