diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/jrnl/admin.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/jrnl/admin.py b/app/jrnl/admin.py index 94759c0..52ab083 100644 --- a/app/jrnl/admin.py +++ b/app/jrnl/admin.py @@ -100,9 +100,15 @@ class HomepageCurratorAdmin(admin.ModelAdmin): @admin.register(Home) class HomeAdmin(admin.ModelAdmin): - form = GalleryForm filter_horizontal = ('popular',) + def formfield_for_dbfield(self, db_field, **kwargs): + if db_field.name == 'thumbnail' or db_field.name == 'image': + field = forms.FileField(widget=AdminImageWidget) + else: + field = super(EntryAdmin, self).formfield_for_dbfield(db_field, **kwargs) + return field + class Media: js = ('image-loader.js', 'next-prev-links.js') css = { |