khaganat-web/navbar/admin.py
2018-01-27 23:12:09 +01:00

14 lines
307 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)