|
@ -31,14 +31,14 @@ def prepnout_fotogalerii_do_org_rezimu(modeladmin, request, queryset): |
|
|
|
|
|
|
|
|
class GalerieInline(admin.TabularInline): |
|
|
class GalerieInline(admin.TabularInline): |
|
|
model = Obrazek |
|
|
model = Obrazek |
|
|
fields = ['obrazek_velky', 'nazev', 'popis', 'obrazek_maly_tag'] |
|
|
fields = ['obrazek_velky', 'nazev', 'popis', 'obrazek_maly_tag', 'poradi'] |
|
|
readonly_fields = ['nazev', 'obrazek_maly_tag'] |
|
|
readonly_fields = ['nazev', 'obrazek_maly_tag'] |
|
|
formfield_overrides = { |
|
|
formfield_overrides = { |
|
|
models.TextField: {'widget': forms.TextInput}, |
|
|
models.TextField: {'widget': forms.TextInput}, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
class ObrazekAdmin(admin.ModelAdmin): |
|
|
class ObrazekAdmin(admin.ModelAdmin): |
|
|
list_display = ('obrazek_velky', 'nazev', 'popis', 'obrazek_maly_tag') |
|
|
list_display = ('obrazek_velky', 'nazev', 'popis', 'obrazek_maly_tag', 'poradi') |
|
|
|
|
|
|
|
|
class GalerieAdmin(admin.ModelAdmin): |
|
|
class GalerieAdmin(admin.ModelAdmin): |
|
|
form = autocomplete_light.modelform_factory(Galerie, autocomplete_fields=['titulni_obrazek'], fields=['titulni_obrazek']) |
|
|
form = autocomplete_light.modelform_factory(Galerie, autocomplete_fields=['titulni_obrazek'], fields=['titulni_obrazek']) |
|
|