created CustomFilter model and api
This commit is contained in:
@ -185,6 +185,22 @@ def automation(request):
|
||||
)
|
||||
|
||||
|
||||
@group_required('user')
|
||||
def custom_filter(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": _("Custom Filters"),
|
||||
"config": {
|
||||
'model': "CUSTOM_FILTER", # *REQUIRED* name of the model in models.js
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@group_required('user')
|
||||
def user_file(request):
|
||||
try:
|
||||
|
Reference in New Issue
Block a user