Galerie: Možnost úpravy pořadí fotek
This commit is contained in:
parent
66715166d4
commit
9b14e96410
1 changed files with 2 additions and 2 deletions
|
@ -31,14 +31,14 @@ def prepnout_fotogalerii_do_org_rezimu(modeladmin, request, queryset):
|
|||
|
||||
class GalerieInline(admin.TabularInline):
|
||||
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']
|
||||
formfield_overrides = {
|
||||
models.TextField: {'widget': forms.TextInput},
|
||||
}
|
||||
|
||||
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):
|
||||
form = autocomplete_light.modelform_factory(Galerie, autocomplete_fields=['titulni_obrazek'], fields=['titulni_obrazek'])
|
||||
|
|
Loading…
Reference in a new issue