2018-01-21 12:44:00 +00:00
|
|
|
from django.contrib import admin
|
2018-01-27 22:12:09 +00:00
|
|
|
from .models import Element, ElementDescription
|
|
|
|
|
2018-01-21 12:44:00 +00:00
|
|
|
|
|
|
|
class ElementDescriptionInline(admin.StackedInline):
|
|
|
|
model = ElementDescription
|
|
|
|
extra = 2
|
|
|
|
|
2018-01-27 22:12:09 +00:00
|
|
|
|
2018-01-21 12:44:00 +00:00
|
|
|
class ElementAdmin(admin.ModelAdmin):
|
|
|
|
inlines = [ElementDescriptionInline]
|
|
|
|
|
2018-01-27 22:12:09 +00:00
|
|
|
|
2018-01-21 12:44:00 +00:00
|
|
|
admin.site.register(Element, ElementAdmin)
|