khaganat-web/navbar/admin.py
2018-01-21 13:44:00 +01:00

11 lines
303 B
Python

from django.contrib import admin
from .models import Element,ElementDescription
class ElementDescriptionInline(admin.StackedInline):
model = ElementDescription
extra = 2
class ElementAdmin(admin.ModelAdmin):
inlines = [ElementDescriptionInline]
admin.site.register(Element, ElementAdmin)