khaganat-web/navbar/admin.py
Rodolphe Breard e0d26e8a7a Add separators within the navbar
Implement #2
2018-01-29 22:34:05 +01:00

15 lines
363 B
Python

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