summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/blog/models.py4
-rw-r--r--app/blog/widgets.py7
-rw-r--r--design/templates/details/entry.html2
-rw-r--r--design/templates/gis/admin/osm_extra.js2
4 files changed, 10 insertions, 5 deletions
diff --git a/app/blog/models.py b/app/blog/models.py
index afa7158..513ce05 100644
--- a/app/blog/models.py
+++ b/app/blog/models.py
@@ -57,8 +57,8 @@ class Entry(models.Model):
)
status = models.IntegerField(choices=PUB_STATUS, default=0)
photo_gallery = models.ForeignKey(PhotoGallery, blank=True, null=True, verbose_name='photo set')
- image = models.FileField(upload_to=get_upload_path, null=True, blank=True)
- thumbnail = models.FileField(upload_to=get_tn_path, null=True, blank=True)
+ image = models.FileField(upload_to=get_upload_path, null=True, blank=True, help_text="should be 205px high")
+ thumbnail = models.FileField(upload_to=get_tn_path, null=True, blank=True, help_text="should be 160 wide")
meta_description = models.CharField(max_length=256, null=True, blank=True)
TEMPLATES = (
(0, 'single'),
diff --git a/app/blog/widgets.py b/app/blog/widgets.py
index ec1bd1d..9295641 100644
--- a/app/blog/widgets.py
+++ b/app/blog/widgets.py
@@ -18,9 +18,14 @@ class AdminImageWidget(AdminFileWidget):
def render(self, name, value, attrs=None):
output = []
file_name = str(value)
+ help_text = ''
if file_name:
file_path = '%s' % (file_name)
- output.append('<a target="_blank" href="%s">%s</a>' % (file_path, thumbnail(file_name)))
+ if attrs['id'] == 'id_thumbnail':
+ help_text = '160 wide'
+ if attrs['id'] == 'id_image':
+ help_text = '205px high'
+ output.append('<span>%s</span><a target="_blank" href="%s">%s</a>' % (help_text, file_path, thumbnail(file_name)))
output.append(super(AdminFileWidget, self).render(name, value, attrs))
return mark_safe(''.join(output))
diff --git a/design/templates/details/entry.html b/design/templates/details/entry.html
index 02dcbe6..0018928 100644
--- a/design/templates/details/entry.html
+++ b/design/templates/details/entry.html
@@ -6,7 +6,7 @@
{% block metadescription %}{{object.meta_description|striptags|safe}}{% endblock %}
{%block extrahead%}
- <link rel="canonical" href="http://luxagraf.net{{object.get_absolute_url}}" />
+ <link rel="canonical" href="https://luxagraf.net{{object.get_absolute_url}}" />
<meta name="ICBM" content="{{object.latitude}}, {{object.longitude}}" />
<meta name="geo.position" content="{{object.latitude}}; {{object.longitude}}" />
<meta name="geo.placename" content="{% if object.country.name == "United States" %}{{object.location.name|smartypants|safe}}, {{object.state.name}}{%else%}{{object.location.name|smartypants|safe}}, {{object.country.name}}{%endif%}">
diff --git a/design/templates/gis/admin/osm_extra.js b/design/templates/gis/admin/osm_extra.js
index 774be47..478f78c 100644
--- a/design/templates/gis/admin/osm_extra.js
+++ b/design/templates/gis/admin/osm_extra.js
@@ -1,4 +1,4 @@
{% extends "gis/admin/openlayers.js" %}
{% block base_layer %}
-new OpenLayers.Layer.XYZ( "ESRI", "http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/${z}/${y}/${x}", {sphericalMercator: true} );
+new OpenLayers.Layer.XYZ( "ESRI", "https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/${z}/${y}/${x}", {sphericalMercator: true} );
{% endblock %}