Cocktail-DB/cocktail_list/admin.py

16 lines
488 B
Python
Raw Permalink Normal View History

2020-05-25 09:49:36 +00:00
from django.contrib import admin
2020-06-14 12:43:31 +00:00
from .models import Ingredienti,Cocktail,Strumenti,Bicchieri,Quantitá
2020-05-25 09:49:36 +00:00
# Register your models here.
2020-06-03 13:45:22 +00:00
class CocktailModel(admin.ModelAdmin):
model = Cocktail
list_display = ('nome_cocktail','lista_ingredienti')
search_fields = ["nome_cocktail","ingredienti__ingrediente"]
2020-05-25 09:49:36 +00:00
admin.site.register(Ingredienti)
2020-06-03 13:45:22 +00:00
admin.site.register(Strumenti)
admin.site.register(Bicchieri)
2020-06-14 12:43:31 +00:00
admin.site.register(Quantitá)
2020-06-03 13:45:22 +00:00
admin.site.register(Cocktail,CocktailModel)