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.
|
|
|
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', 'pk', 'datum_zmeny', 'zobrazit')
|
|
|
|
inlines = [GalerieInline]
|
|
|
|
|
|
|
|
admin.site.register(Obrazek, ObrazekAdmin)
|
|
|
|
admin.site.register(Galerie, GalerieAdmin)
|