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.
 
 
 
 
 
 

18 lines
582 B

from galerie.models import Obrazek, Galerie
from django.contrib import admin
from django.http import HttpResponseRedirect
class GalerieInline(admin.TabularInline):
model = Obrazek
class ObrazekAdmin(admin.ModelAdmin):
list_display = ('obrazek_velky', 'nazev', 'popis')
class GalerieAdmin(admin.ModelAdmin):
model = Galerie
fields = ('zobrazit', 'nazev', 'titulni_obrazek', 'popis', 'galerie_up', 'soustredeni')
list_display = ('nazev', 'datum_zmeny')
inlines = [GalerieInline]
admin.site.register(Obrazek, ObrazekAdmin)
admin.site.register(Galerie, GalerieAdmin)