summaryrefslogtreecommitdiff
path: root/app/utils/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/utils/widgets.py')
-rw-r--r--app/utils/widgets.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/utils/widgets.py b/app/utils/widgets.py
index eac4631..2b76f6b 100644
--- a/app/utils/widgets.py
+++ b/app/utils/widgets.py
@@ -99,6 +99,11 @@ def thumbnail(image_path):
return '<img style="max-width: 400px" src="%s" alt="%s" />' % (absolute_url, image_path)
+class ImageRadioSelect(forms.RadioSelect):
+ template_name = 'horizontal_select.html'
+
+
+
class AdminImageWidget(AdminFileWidget):
"""
A FileField Widget that displays an image instead of a file path
@@ -124,6 +129,7 @@ class LGEntryForm(forms.ModelForm):
class Meta:
widgets = {
'body_markdown': forms.Textarea(attrs={'rows': 40, 'cols': 100}),
+ 'featured_image': ImageRadioSelect,
}
@@ -132,6 +138,8 @@ class LGEntryFormSmall(forms.ModelForm):
widgets = {
'body_markdown': forms.Textarea(attrs={'rows': 12, 'cols': 100}),
}
+
+
class OLAdminBase(OSMGeoAdmin):
default_lon = -9285175
default_lat = 4025046