Browse Source
Admin se v konecne fazi na toto pouzivat nebude, proto je jen docasny a je velmi ale velmi nepohodlny na tu spoustu a spoustu fotek.remotes/origin/Float_novinky
Bc. Petr Pecha
9 years ago
2 changed files with 19 additions and 1 deletions
@ -0,0 +1,18 @@ |
|||||
|
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) |
Loading…
Reference in new issue