diff --git a/matemat/__main__.py b/matemat/__main__.py index bcfd877..d3dd5e8 100644 --- a/matemat/__main__.py +++ b/matemat/__main__.py @@ -67,8 +67,9 @@ def get_thumbnail(resource: str, filename: str): static: str = os.path.abspath(config['staticroot']) rpath: str = os.path.join(static, 'upload/thumbnails', resource) resp = bottle.static_file(filename, root=rpath) - if resp.status_code != 200: + if resp.status_code >= 400: resp = bottle.static_file('default.png', root=rpath) + resp.headers['Cache-Control'] = 'public, max-age=0;' return resp diff --git a/templates/admin.html b/templates/admin.html index 2472676..6f53815 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -112,7 +112,7 @@ {{ product.price_non_member | chf }} {{ '✓' if product.custom_price else '✗' }} {{ '✓' if product.stockable else '✗' }} - Picture of {{ product.name }} + Picture of {{ product.name }}
Edit @@ -134,7 +134,7 @@
- Default user avatar + Default user avatar
@@ -146,7 +146,7 @@
- Default product image + Default product image
diff --git a/templates/modproduct.html b/templates/modproduct.html index 77c34a6..0fe4867 100644 --- a/templates/modproduct.html +++ b/templates/modproduct.html @@ -36,7 +36,7 @@


diff --git a/templates/moduser.html b/templates/moduser.html index 38b12c3..29d292b 100644 --- a/templates/moduser.html +++ b/templates/moduser.html @@ -49,7 +49,7 @@


diff --git a/templates/productlist.html b/templates/productlist.html index a0f8c47..a335bd3 100644 --- a/templates/productlist.html +++ b/templates/productlist.html @@ -66,7 +66,7 @@ {% endif %}
- Picture of {{ product.name }} + Picture of {{ product.name }} {% set pstock = stock.get_stock(product) %} {% if pstock is not none %}
diff --git a/templates/settings.html b/templates/settings.html index 5d3e595..d9578ae 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -28,7 +28,7 @@
{{ authuser.name }}
- Avatar of {{ authuser.name }} + Avatar of {{ authuser.name }}
diff --git a/templates/userlist.html b/templates/userlist.html index 8086421..9a32a26 100644 --- a/templates/userlist.html +++ b/templates/userlist.html @@ -10,7 +10,7 @@
{{ user.name }}
- Avatar of {{ user.name }} + Avatar of {{ user.name }}
{% endfor %}