# Todo: reversion from django.contrib import admin from django.db import models from django.forms import widgets from solo.admin import SingletonModelAdmin from seminar.models.nastaveni import Nastaveni from personalni.models import Resitel from seminar.models.novinky import Novinky from seminar.models.pomocne import Text, Obrazek class TextAdminInline(admin.TabularInline): model = Text formfield_overrides = { models.TextField: {'widget': widgets.TextInput} } exclude = ['text_zkraceny_set','text_zkraceny'] admin.site.register(Text) class ResitelInline(admin.TabularInline): model = Resitel extra = 1 # admin.site.register(Pohadka) admin.site.register(Obrazek) admin.site.register(Nastaveni, SingletonModelAdmin) admin.site.register(Novinky)