Add search ability to recette admin

This commit is contained in:
Claude Paroz 2022-01-07 16:38:50 +01:00
parent 4ae6001a08
commit 6719e8575c

View file

@ -34,6 +34,7 @@ class RecetteForm(forms.ModelForm):
@admin.register(Recette)
class RecetteAdmin(admin.ModelAdmin):
list_display = ['nom', 'has_photo', 'has_photo_instr']
search_fields = ['nom']
form = RecetteForm
save_on_top = True
inlines = [IngredientInline]