cleanup, version and settings bump

This commit is contained in:
Moritz Münch 2021-10-04 10:57:24 +00:00
parent 2ec75f11c4
commit 0561aa54f4
3 changed files with 28 additions and 21 deletions

View File

@ -1,14 +1,16 @@
{% include 'header.html' with title='Münzsammlung' %} {% include 'header.html' with title='Münzsammlung' %}
{% if countrys %} {% if countrys %}
<p><h5>Gesamtwert {{ coin_sum }}</h5></p> <h5>Gesamtwert {{ coin_sum }}</h5>
{% include 'coinc/filter_country.html' with countrys=countrys %} {% include 'coinc/filter_country.html' with countrys=countrys %}
<p><h5>Zuletzt gefunden</h5></p> <h5>Zuletzt gefunden</h5>
{% for coin in recent_coins %} {% for coin in recent_coins %}
{% if coin.exists %} {% if coin.exists %}
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} &euro; {{ coin.year }}{% if coin.stamp %}-{{ coin.stamp }}{% endif %}{% if coin.name %} "{{ coin.name }}"{% endif %} aus {{ coin.country}} von {{ coin.found_by }}</p> {% if coin.found_by %}
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} &euro; {{ coin.year }}{% if coin.stamp %}-{{ coin.stamp }}{% endif %}{% if coin.name %} "{{ coin.name }}"{% endif %} aus {{ coin.country}} von {{ coin.found_by }}</p>
{% endif %} {% endif %}
{% endfor %}
{% else %}
<p>Trage zuerst Länder im Adminbereich ein.</p>
{% endif %} {% endif %}
{% endfor %}
{% else %}
<p>Trage zuerst Länder im Adminbereich ein.</p>
{% endif %}
{% include 'footer.html' %} {% include 'footer.html' %}

View File

@ -1,3 +1,3 @@
<span class="badge badge-pill badge-light">Version 210712</span> <span class="badge badge-pill badge-light">Version 211004</span>
</body> </body>
</html> </html>

View File

@ -32,7 +32,7 @@ ALLOWED_HOSTS = ['willipink.eu']
INSTALLED_APPS = [ INSTALLED_APPS = [
'coinc.apps.CoincConfig', 'coinc.apps.CoincConfig',
'cacheops', # 'cacheops',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
@ -135,22 +135,27 @@ MAINTENANCE_MODE_READ_ONLY = False
LOGIN_REDIRECT_URL = './' LOGIN_REDIRECT_URL = './'
# caching # caching
CACHES = { # CACHES = {
'default': { # 'default': {
# file-based # file-based
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', # 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/var/tmp/django-cache', # 'LOCATION': '/var/tmp/django-cache',
'TIMEOUT': None, # 'TIMEOUT': None,
# memory-based # memory-based
#'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', #'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
#'LOCATION': 'coinc', #'LOCATION': 'coinc',
#'TIMEOUT': None, #'TIMEOUT': None,
} # }
} # }
# caching # caching
# CACHE_MIDDLEWARE_ALIAS = 'default' # CACHE_MIDDLEWARE_ALIAS = 'default'
# CACHE_MIDDLEWARE_SECONDS = 60*60*24*365 # CACHE_MIDDLEWARE_SECONDS = 60*60*24*365
CACHEOPS_REDIS = "unix://var/run/redis/redis-server.sock" # CACHEOPS_REDIS = "unix://var/run/redis/redis-server.sock"
CACHEOPS_DEGRADE_ON_FAILURE = True # CACHEOPS_DEFAULTS = { 'timeout': 60*60*24*365 }
# CACHEOPS = {
# # 'coinc.*': None,
# 'coinc.coin': { 'cache_on_save': True }
# }
# CACHEOPS_DEGRADE_ON_FAILURE = True