graphene-django/examples/cookbook-plain/cookbook/ingredients/admin.py
2017-02-14 20:23:45 +02:00

13 lines
285 B
Python

from django.contrib import admin
from cookbook.ingredients.models import Category, Ingredient
@admin.register(Ingredient)
class IngredientAdmin(admin.ModelAdmin):
list_display = ('id', 'name', 'category')
list_editable = ('name', 'category')
admin.site.register(Category)