mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
finished making FoodList completely generic
This commit is contained in:
@@ -110,4 +110,16 @@ def keyword(request):
|
||||
|
||||
@group_required('user')
|
||||
def food(request):
|
||||
return render(request, 'generic/model_template.html', {"title": _("Foods")})
|
||||
# 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": _("Foods"),
|
||||
"config": {
|
||||
'model': "FOOD", # *REQUIRED* name of the model in models.js
|
||||
'recipe_param': 'foods' # *OPTIONAL* name of the listRecipes parameter if filtering on this attribute
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user