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