Add search ability to recette admin
This commit is contained in:
parent
4ae6001a08
commit
6719e8575c
|
@ -34,6 +34,7 @@ class RecetteForm(forms.ModelForm):
|
||||||
@admin.register(Recette)
|
@admin.register(Recette)
|
||||||
class RecetteAdmin(admin.ModelAdmin):
|
class RecetteAdmin(admin.ModelAdmin):
|
||||||
list_display = ['nom', 'has_photo', 'has_photo_instr']
|
list_display = ['nom', 'has_photo', 'has_photo_instr']
|
||||||
|
search_fields = ['nom']
|
||||||
form = RecetteForm
|
form = RecetteForm
|
||||||
save_on_top = True
|
save_on_top = True
|
||||||
inlines = [IngredientInline]
|
inlines = [IngredientInline]
|
||||||
|
|
Loading…
Reference in a new issue