From b4e07cf6930afb324635610538d6dd2a4a1a446d Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 6 Jul 2019 14:40:33 +0300 Subject: [PATCH] Fix materilal fileinput styles for inlines. --- material/options.py | 2 -- .../{material => admin}/widgets/clearable_file_input.html | 0 material/widgets.py | 5 ----- 3 files changed, 7 deletions(-) rename material/templates/{material => admin}/widgets/clearable_file_input.html (100%) diff --git a/material/options.py b/material/options.py index 22be1c9c..f891fd52 100644 --- a/material/options.py +++ b/material/options.py @@ -13,8 +13,6 @@ }, models.TimeField: {'widget': widgets.MaterialAdminTimeWidget}, models.TextField: {'widget': widgets.MaterialAdminTextareaWidget}, - models.ImageField: {'widget': widgets.MaterialAdminFileWidget}, - models.FileField: {'widget': widgets.MaterialAdminFileWidget}, } diff --git a/material/templates/material/widgets/clearable_file_input.html b/material/templates/admin/widgets/clearable_file_input.html similarity index 100% rename from material/templates/material/widgets/clearable_file_input.html rename to material/templates/admin/widgets/clearable_file_input.html diff --git a/material/widgets.py b/material/widgets.py index eb7fb2f4..718ff6c6 100644 --- a/material/widgets.py +++ b/material/widgets.py @@ -24,11 +24,6 @@ class MaterialAdminTimeWidget(forms.TimeInput): template_name = 'material/widgets/time.html' -class MaterialAdminFileWidget(widgets.AdminFileWidget): - """File input with material css styles""" - template_name = 'material/widgets/clearable_file_input.html' - - class MaterialAdminTextareaWidget(widgets.AdminTextareaWidget): """Textarea with material css styles"""