You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
763 B

# 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)