#48 still not working completely

This commit is contained in:
Moritz Münch 2021-07-12 09:13:57 +00:00
parent e65e901a66
commit fa3e285330
8 changed files with 19 additions and 10 deletions

View File

@ -11,6 +11,7 @@ pydotplus = "*"
[packages]
django = "*"
django-cacheops = "*"
[requires]
python_version = "3.8"

6
bak Normal file
View File

@ -0,0 +1,6 @@
{% if coin.name %}
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} € von {{ coin.year }} "{{ coin.name }}" aus {{ coin.country}} von {{ coin.found_by }}</p>
{⅝ else %}
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} € von {{ coin.year }} aus {{ coin.country}} von {{ coin.found_by }}</p>
{% endif %}

View File

@ -49,7 +49,7 @@ class Country(Model):
def __str__(self):
return f"{self.name} {self.name_iso} {self.comment}"
return f"{self.name}"

View File

@ -2,9 +2,9 @@
{% if countrys %}
<p><h5>Gesamtwert {{ coin_sum }}</h5></p>
{% include 'coinc/filter_country.html' with countrys=countrys %}
<p><h5>Zuletzt hinzugefügt</h5></p>
{% for coin in recent_coins %}
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} € {{ coin.name }} von {{ coin.found_by }}</p>
<p><h5>Zuletzt gefunden</h5></p>
{ for coin in recent_coins %}
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} € von {{ coin.year }} aus {{ coin.country}} von {{ coin.found_by }}</p>
{% endfor %}
{% else %}
<p>Trage zuerst Länder im Adminbereich ein.</p>{% endif %}

View File

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

View File

@ -32,6 +32,7 @@ ALLOWED_HOSTS = ['willipink.eu']
INSTALLED_APPS = [
'coinc.apps.CoincConfig',
'cacheops',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
@ -149,6 +150,7 @@ CACHES = {
# caching
# 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_DEGRADE_ON_FAILURE = True

Binary file not shown.

8
update
View File

@ -18,14 +18,14 @@ git pull -q origin master >/dev/null
echo -n "... bumping "
version=$(date +"%y%m%d")
sed -i "s/[0-9]\{6\}/$version/g" coinc/templates/footer.html >/dev/null
sed -i "s/[0-9]\{6\}/$version/g" coinc/templates/footer.html
echo -n "... collecting "
python3 manage.py collectstatic --settings coinmanager.production_settings --no-input >/dev/null
python3 manage.py collectstatic --settings coinmanager.production_settings --no-input
echo -n "... owning "
sudo chmod 775 db.sqlite3
sudo chown -R $user:$web_user $path >/dev/null
sudo chown -R $user:$web_user $path
echo "... reloading "
sudo systemctl restart apache2 >/dev/null
sudo systemctl restart apache2