From 344447b9097617f0b8730051628cc8f777638eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Mon, 18 Dec 2017 09:03:52 +0100 Subject: [PATCH 01/53] UN-finished Push of currency branch. Preview only, do not change. Ivan on charge. --- django/didgeridoo/currencies/__init__.py | 0 django/didgeridoo/currencies/admin.py | 3 + django/didgeridoo/currencies/apps.py | 5 + .../didgeridoo/currencies/exchange_rates.py | 117 ++++++++++++++++++ .../currencies/migrations/__init__.py | 0 django/didgeridoo/currencies/models.py | 20 +++ django/didgeridoo/currencies/tests.py | 3 + django/didgeridoo/currencies/views.py | 3 + django/didgeridoo/didgeridoo/settings.py | 3 +- django/didgeridoo/webshop/models.py | 8 -- 10 files changed, 153 insertions(+), 9 deletions(-) create mode 100644 django/didgeridoo/currencies/__init__.py create mode 100644 django/didgeridoo/currencies/admin.py create mode 100644 django/didgeridoo/currencies/apps.py create mode 100644 django/didgeridoo/currencies/exchange_rates.py create mode 100644 django/didgeridoo/currencies/migrations/__init__.py create mode 100644 django/didgeridoo/currencies/models.py create mode 100644 django/didgeridoo/currencies/tests.py create mode 100644 django/didgeridoo/currencies/views.py diff --git a/django/didgeridoo/currencies/__init__.py b/django/didgeridoo/currencies/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/django/didgeridoo/currencies/admin.py b/django/didgeridoo/currencies/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/django/didgeridoo/currencies/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/django/didgeridoo/currencies/apps.py b/django/didgeridoo/currencies/apps.py new file mode 100644 index 0000000..055501d --- /dev/null +++ b/django/didgeridoo/currencies/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class CurrenciesConfig(AppConfig): + name = 'currencies' diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py new file mode 100644 index 0000000..ebbbb12 --- /dev/null +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -0,0 +1,117 @@ +from datetime import datetime +import urllib.request +import xml.etree.ElementTree as ET + +today = datetime.now().strftime("%Y-%m-%d") + +""" this method calls a rss/XML Resource + of Currency's and parses it to our + needed exchange rate values. + The return is a dictionary carring + Key:Value pairs of new currencys. +""" + + +def get_exchange_rate(): + # During weekends there are no updates. + # To develop i need a testresource. + # In that case i comment the Online Resource block and uncomment the + # development Block... + # ~~~~~~~~~~~~~~~~~~~~~ + # Online Resource block: + # ~~~~~~~~~~~~~~~~~~~~~ + # SNB_URL = 'https://www.snb.ch/selector/de/mmr/exfeed/rss' + # urlsocket = urllib.request.urlopen(SNB_URL) + # root = ET.parse(urlsocket) + # root = ET.ElementTree(root) + + # ~~~~~~~~~~~~~~~~~~~~~ + # development block: + # ~~~~~~~~~~~~~~~~~~~~~ + root = ET.ElementTree(file='rss') + ns = {'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', + 'none': 'http://purl.org/rss/1.0/', + 'dc': 'http://purl.org/dc/elements/1.1/', + 'dcterms': 'http://purl.org/dc/terms/', + 'cb': 'http://www.cbwiki.net/wiki/index.php/Specification_1.2/' + } + # Pathvariables to XML Namespaces + none_path = 'none:item/' + rate_path = 'cb:statistics/cb:exchangeRate/' + observation_path = 'cb:statistics/cb:exchangeRate/cb:observation/' + # THE FILE DATE: + xml_datetime_string = root.find('none:channel/dcterms:created', ns).text + # because of few knowlede just trim end of string to avoid error + xml_datestring = xml_datetime_string.split('T')[0] + # parse string to date object: + xml_date = datetime.date(datetime.strptime(xml_datestring, "%Y-%m-%d")) + + for item in root.findall('none:item', ns): + # THE CURRENCY DATE: + datetime_str = item.find('dc:date', ns).text + # convert string to date object: + # https://stackoverflow.com/a/12282040/4061870 + date = datetime.strptime(''.join(datetime_str.rsplit(':', 1)), + "%Y-%m-%dT%H:%M:%S.%f%z").strftime("%Y-%m-%d") + # only the values of today are used so check for date: + if date == today: + title = item.find('none:title', ns).text + base_currency = item.find(rate_path + + 'cb:baseCurrency', ns).text + target_currency = item.find(rate_path + + 'cb:targetCurrency', ns).text + CHFvalue = float(item.find(observation_path + + 'cb:value', ns).text) + CHFvalue = float(CHFvalue) # convert to float + FOREIGNvalue = CHFvalue # copy to new value to have both. + unit = item.find(observation_path + 'cb:unit', ns).text + decimals = int(item.find(observation_path + + 'cb:decimals', ns).text) + # because it's dangerous to check for present, i check for none + # here and have to do something in there so i set the target to 0. + if item.find(observation_path + 'cb:unit_mult', ns) is None: + unit_mult = float("1.0") + else: + # shift left by 2 digits with "/" + # https://stackoverflow.com/questions/8362792/ + # because some currencys differ widly from CHF + unit_mult = item.find(observation_path + + 'cb:unit_mult', ns).text + # unit_mult defaults to '0' so we check for 8 decimal + # values (2..-6) they represent the fracton value to + # calculate the correct decimalpoint. + if unit_mult == '2': # thinking of Bitcoins + unit_mult = '0.01' + if unit_mult == '1': + unit_mult = '0.10' + if unit_mult == '-1': + unit_mult = '10' + if unit_mult == '-2': # Japan Yen + unit_mult = '100' + if unit_mult == '-3': + unit_mult = '1000' + if unit_mult == '-4': + unit_mult = '10000' + if unit_mult == '-5': + unit_mult = '100000' + if unit_mult == '-6': # indian rupies + unit_mult = '1000000' + unit_mult = float(unit_mult) # convert to float + # calculate the Currency to CHF: + FOREIGNvalue = 1 / CHFvalue + FOREIGNvalue *= unit_mult + CHFvalue = CHFvalue / unit_mult + # truncate it to decimal values provided by the xml: + FOREIGNvalue_round = round(FOREIGNvalue, 5) + # Print nice setup of all calculated currencys for Dev: + # print("date:", date, " 1 ", target_currency, " costs: ", + # CHFvalue, "CHF and 1 ", base_currency, " costs: ", + # FOREIGNvalue_round, target_currency) + exchange_rates = {target_currency: FOREIGNvalue_round} + # Print the Dictionary: + # print(exchange_rates) + return(exchange_rates) + else: + break + # for development its preferable to see that the for loop is done: + # print('no more fresh data!') diff --git a/django/didgeridoo/currencies/migrations/__init__.py b/django/didgeridoo/currencies/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/django/didgeridoo/currencies/models.py b/django/didgeridoo/currencies/models.py new file mode 100644 index 0000000..829609d --- /dev/null +++ b/django/didgeridoo/currencies/models.py @@ -0,0 +1,20 @@ +from django.db import models +import exchange_rates + + +class ExchangeRate(models.Model): + name = models.CharField(max_length=200, unique=True) + exchange_rate_to_chf = models.FloatField(max_length=5) + + def __str__(self): + return self.name + + def exchange_rates(): + exchange_rates = currencies.get_exchange_rate() + + for i in exchange_rates: + if ExchangeRate.objects.filter( + name='exchange_rates_data[dictionary_value]'): + ExchangeRate.objects.filter( + name='exchange_rates_data[dictionary_key]', + exchange_rate_to_chf=exchange_rates.value).save() diff --git a/django/didgeridoo/currencies/tests.py b/django/didgeridoo/currencies/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/django/didgeridoo/currencies/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/django/didgeridoo/currencies/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/django/didgeridoo/didgeridoo/settings.py b/django/didgeridoo/didgeridoo/settings.py index 682b4be..3b01f6e 100644 --- a/django/didgeridoo/didgeridoo/settings.py +++ b/django/didgeridoo/didgeridoo/settings.py @@ -39,7 +39,8 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', -] + 'currencies', + ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', diff --git a/django/didgeridoo/webshop/models.py b/django/didgeridoo/webshop/models.py index 185abd4..62fbca5 100644 --- a/django/didgeridoo/webshop/models.py +++ b/django/didgeridoo/webshop/models.py @@ -29,14 +29,6 @@ class ArticleStatus(models.Model): return self.name -class ExchangeRate(models.Model): - name = models.CharField(max_length=200, unique=True) - exchange_rate_to_chf = models.FloatField(max_length=5) - - def __str__(self): - return self.name - - # Create your models here. class Category(models.Model): name = models.CharField(max_length=200, unique=True) From 409b18807bbc79e5205e95a1f343f848f3f473ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Mon, 18 Dec 2017 19:19:08 +0100 Subject: [PATCH 02/53] corrections and first try to migrate --- django/didgeridoo/currencies/index.html | 20 ++++++++++++++++ .../currencies/migrations/0001_initial.py | 24 +++++++++++++++++++ django/didgeridoo/currencies/models.py | 1 - django/didgeridoo/currencies/urls.py | 7 ++++++ django/didgeridoo/currencies/views.py | 6 ++++- django/didgeridoo/didgeridoo/settings.py | 2 +- 6 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 django/didgeridoo/currencies/index.html create mode 100644 django/didgeridoo/currencies/migrations/0001_initial.py create mode 100644 django/didgeridoo/currencies/urls.py diff --git a/django/didgeridoo/currencies/index.html b/django/didgeridoo/currencies/index.html new file mode 100644 index 0000000..41b4d61 --- /dev/null +++ b/django/didgeridoo/currencies/index.html @@ -0,0 +1,20 @@ + + + + + +
+

audioguide

+

a mobile offline audioguide

+noop +noop +noop +noop +noop +noop +

the audioguide that makes a offline usage possible.

+
+ + + diff --git a/django/didgeridoo/currencies/migrations/0001_initial.py b/django/didgeridoo/currencies/migrations/0001_initial.py new file mode 100644 index 0000000..c7f74a7 --- /dev/null +++ b/django/didgeridoo/currencies/migrations/0001_initial.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-12-18 18:01 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='ExchangeRate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200, unique=True)), + ('exchange_rate_to_chf', models.FloatField(max_length=5)), + ], + ), + ] diff --git a/django/didgeridoo/currencies/models.py b/django/didgeridoo/currencies/models.py index 829609d..79e45c7 100644 --- a/django/didgeridoo/currencies/models.py +++ b/django/didgeridoo/currencies/models.py @@ -1,5 +1,4 @@ from django.db import models -import exchange_rates class ExchangeRate(models.Model): diff --git a/django/didgeridoo/currencies/urls.py b/django/didgeridoo/currencies/urls.py new file mode 100644 index 0000000..a3780aa --- /dev/null +++ b/django/didgeridoo/currencies/urls.py @@ -0,0 +1,7 @@ +from django.conf.urls import url + +from . import views + +urlpatterns = [ + url(r'^$', views.index, name='index'), +] diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index 91ea44a..47d054b 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -1,3 +1,7 @@ from django.shortcuts import render +from django.http import HttpResponse +import exchange_rates -# Create your views here. + +def index(request): + return HttpResponse(exchange_rates) diff --git a/django/didgeridoo/didgeridoo/settings.py b/django/didgeridoo/didgeridoo/settings.py index 3b01f6e..9d51a5b 100644 --- a/django/didgeridoo/didgeridoo/settings.py +++ b/django/didgeridoo/didgeridoo/settings.py @@ -32,6 +32,7 @@ ALLOWED_HOSTS = [] INSTALLED_APPS = [ 'webshop.apps.WebshopConfig', + 'currencies.apps.CurrenciesConfig', 'django_extensions', 'django.contrib.admin', 'django.contrib.auth', @@ -39,7 +40,6 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'currencies', ] MIDDLEWARE = [ From 776f81b3c9b8f2304306227cbb064e309a6f7216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Tue, 19 Dec 2017 21:28:05 +0100 Subject: [PATCH 03/53] testpush --- django/didgeridoo/currencies/index.html | 20 ------------------- django/didgeridoo/currencies/models.py | 10 ---------- .../templates/currencies/index.html | 19 ++++++++++++++++++ django/didgeridoo/currencies/urls.py | 4 ++-- django/didgeridoo/currencies/views.py | 17 +++++++++++++--- django/didgeridoo/didgeridoo/urls.py | 2 +- 6 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 django/didgeridoo/currencies/index.html create mode 100644 django/didgeridoo/currencies/templates/currencies/index.html diff --git a/django/didgeridoo/currencies/index.html b/django/didgeridoo/currencies/index.html deleted file mode 100644 index 41b4d61..0000000 --- a/django/didgeridoo/currencies/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - -
-

audioguide

-

a mobile offline audioguide

-noop -noop -noop -noop -noop -noop -

the audioguide that makes a offline usage possible.

-
- - - diff --git a/django/didgeridoo/currencies/models.py b/django/didgeridoo/currencies/models.py index 79e45c7..1edbe06 100644 --- a/django/didgeridoo/currencies/models.py +++ b/django/didgeridoo/currencies/models.py @@ -7,13 +7,3 @@ class ExchangeRate(models.Model): def __str__(self): return self.name - - def exchange_rates(): - exchange_rates = currencies.get_exchange_rate() - - for i in exchange_rates: - if ExchangeRate.objects.filter( - name='exchange_rates_data[dictionary_value]'): - ExchangeRate.objects.filter( - name='exchange_rates_data[dictionary_key]', - exchange_rate_to_chf=exchange_rates.value).save() diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html new file mode 100644 index 0000000..edfd456 --- /dev/null +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -0,0 +1,19 @@ + + + + + +
+

Music Shop

+ {% if currency_list %} +
    + {% for currency in currency_list %} +
  • {{ currency.name }} : {{ currency.exchange_rate_to_chf }}
  • + {% endfor %} +
+ {% else %} +

No categories are available.

+ {% endif %} +
+ + diff --git a/django/didgeridoo/currencies/urls.py b/django/didgeridoo/currencies/urls.py index a3780aa..2804c74 100644 --- a/django/didgeridoo/currencies/urls.py +++ b/django/didgeridoo/currencies/urls.py @@ -1,7 +1,7 @@ from django.conf.urls import url +from currencies.views import currencies -from . import views urlpatterns = [ - url(r'^$', views.index, name='index'), + url(r'^currencies/$', currencies), ] diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index 47d054b..7926760 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -1,7 +1,18 @@ from django.shortcuts import render -from django.http import HttpResponse +from .models import ExchangeRate import exchange_rates -def index(request): - return HttpResponse(exchange_rates) +def currencies(request): + # return HttpResponse("exchange_rates") + currency_list = ExchangeRate.objects.all() + raw_data = exchange_rates.get_exchange_rate() + + for i, j in raw_data.items: + ExchangeRate.objects.create( + name=i, + exchange_rate_to_chf=j) + + return render(request, + 'currencies/index.html', + {'currency_list': currency_list}) diff --git a/django/didgeridoo/didgeridoo/urls.py b/django/didgeridoo/didgeridoo/urls.py index 1eef47b..a9524c5 100644 --- a/django/didgeridoo/didgeridoo/urls.py +++ b/django/didgeridoo/didgeridoo/urls.py @@ -18,6 +18,6 @@ from django.contrib import admin urlpatterns = [ url(r'', include('webshop.urls')), - url(r'^admin/', admin.site.urls), + url(r'', include('currencies.urls')), url(r'^admin/', admin.site.urls), ] From fc5184fa778b3dc450f806616cece1c684d41556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Tue, 19 Dec 2017 22:33:00 +0100 Subject: [PATCH 04/53] get currency from SNB rss to work --- .../didgeridoo/currencies/exchange_rates.py | 19 +- .../templates/currencies/index.html | 2 +- django/didgeridoo/currencies/views.py | 25 +- django/didgeridoo/rss | 621 ++++++++++++++++++ 4 files changed, 649 insertions(+), 18 deletions(-) create mode 100644 django/didgeridoo/rss diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py index ebbbb12..2900892 100644 --- a/django/didgeridoo/currencies/exchange_rates.py +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -20,15 +20,17 @@ def get_exchange_rate(): # ~~~~~~~~~~~~~~~~~~~~~ # Online Resource block: # ~~~~~~~~~~~~~~~~~~~~~ - # SNB_URL = 'https://www.snb.ch/selector/de/mmr/exfeed/rss' - # urlsocket = urllib.request.urlopen(SNB_URL) - # root = ET.parse(urlsocket) - # root = ET.ElementTree(root) + SNB_URL = 'https://www.snb.ch/selector/de/mmr/exfeed/rss' + urlsocket = urllib.request.urlopen(SNB_URL) + root = ET.parse(urlsocket) + root = ET.ElementTree(root) # ~~~~~~~~~~~~~~~~~~~~~ # development block: # ~~~~~~~~~~~~~~~~~~~~~ - root = ET.ElementTree(file='rss') + # root = ET.ElementTree(file='rss') + # ~~~~~~~~~~~~~~~~~~~~~ + # Namespaces ns = {'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'none': 'http://purl.org/rss/1.0/', 'dc': 'http://purl.org/dc/elements/1.1/', @@ -45,7 +47,7 @@ def get_exchange_rate(): xml_datestring = xml_datetime_string.split('T')[0] # parse string to date object: xml_date = datetime.date(datetime.strptime(xml_datestring, "%Y-%m-%d")) - + exchange_rates = {} for item in root.findall('none:item', ns): # THE CURRENCY DATE: datetime_str = item.find('dc:date', ns).text @@ -107,11 +109,12 @@ def get_exchange_rate(): # print("date:", date, " 1 ", target_currency, " costs: ", # CHFvalue, "CHF and 1 ", base_currency, " costs: ", # FOREIGNvalue_round, target_currency) - exchange_rates = {target_currency: FOREIGNvalue_round} + exchange_rates.update( + {target_currency: FOREIGNvalue_round}) # Print the Dictionary: # print(exchange_rates) - return(exchange_rates) else: break + return(exchange_rates) # for development its preferable to see that the for loop is done: # print('no more fresh data!') diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html index edfd456..3c1e8a7 100644 --- a/django/didgeridoo/currencies/templates/currencies/index.html +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -4,7 +4,7 @@
-

Music Shop

+

Currencies in CHF

{% if currency_list %}
    {% for currency in currency_list %} diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index 7926760..23f8952 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -1,18 +1,25 @@ from django.shortcuts import render -from .models import ExchangeRate -import exchange_rates +from currencies.models import ExchangeRate +from currencies import exchange_rates def currencies(request): # return HttpResponse("exchange_rates") - currency_list = ExchangeRate.objects.all() raw_data = exchange_rates.get_exchange_rate() - - for i, j in raw_data.items: - ExchangeRate.objects.create( - name=i, - exchange_rate_to_chf=j) - + for i, j in raw_data.items(): + if ExchangeRate.objects.filter(name=i): + e = ExchangeRate.objects.filter( + name=i, + ).update( + exchange_rate_to_chf=j + ) + else: + e = ExchangeRate.objects.create( + name=i, + exchange_rate_to_chf=j + ) + e.save() + currency_list = ExchangeRate.objects.all() return render(request, 'currencies/index.html', {'currency_list': currency_list}) diff --git a/django/didgeridoo/rss b/django/didgeridoo/rss new file mode 100644 index 0000000..af36b76 --- /dev/null +++ b/django/didgeridoo/rss @@ -0,0 +1,621 @@ + + + + SNB Devisenkurse + https://www.snb.ch/de/ifor/media/id/media_rss + Schweizerische Nationalbank (SNB): Devisenkurse (Ankauf Zürich 11 Uhr) + + + + + + + + + + + + + + + + + + + + + + + + + SNB + Copyright © Schweizerische Nationalbank, Zürich (Schweiz) 2017 + https://www.snb.ch/de/srv/id/disclaimer + 2017-11-28T07:50:22+01:00 + + + CH: 1.3081 CHF = 1 GBP 2017-11-27 Tägliche Kurse (11:00) + https://www.snb.ch + 1 GBP = 1.3081 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.767+01:00) + 2017-12-19T12:16:53.767+01:00 + de + + + CH + SNB + + + + + 1.3081 + CHF + 4 + + CHF + GBP + Tägliche Kurse (11:00) + + + daily + 2017-11-27 + + + + + + CH: 0.8813 CHF = 100 JPY 2017-11-27 Tägliche Kurse (11:00) + https://www.snb.ch + 100 JPY = 0.8813 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.760+01:00) + 2017-12-19T12:16:53.760+01:00 + de + + + CH + SNB + + + + + 10000.8813 + CHF + -2 + 4 + + CHF + JPY + Tägliche Kurse (11:00) + + + daily + 2017-11-27 + + + + + + CH: 1.1697 CHF = 1 EUR 2017-11-27 Tägliche Kurse (11:00) + https://www.snb.ch + 1 EUR = 1.1697 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.750+01:00) + 2017-12-19T12:16:53.750+01:00 + de + + + CH + SNB + + + + + 1.1697 + CHF + 4 + + CHF + EUR + Tägliche Kurse (11:00) + + + daily + 2017-11-27 + + + + + + CH: 0.9803 CHF = 1 USD 2017-11-27 Tägliche Kurse (11:00) + https://www.snb.ch + 1 USD = 0.9803 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.737+01:00) + 2017-11-29T12:16:53.737+01:00 + de + + + CH + SNB + + + + + 0.9803 + CHF + 4 + + CHF + USD + Tägliche Kurse (11:00) + + + daily + 2017-11-27 + + + + + + CH: 1.3072 CHF = 1 GBP 2017-11-24 Tägliche Kurse (11:00) + https://www.snb.ch + 1 GBP = 1.3072 CHF (Tägliche Kurse (11:00); 2017-11-24T12:19:49.733+01:00) + 2017-11-24T12:19:49.733+01:00 + de + + + CH + SNB + + + + + 1.3072 + CHF + 4 + + CHF + GBP + Tägliche Kurse (11:00) + + + daily + 2017-11-24 + + + + + + CH: 0.8806 CHF = 100 JPY 2017-11-24 Tägliche Kurse (11:00) + https://www.snb.ch + 100 JPY = 0.8806 CHF (Tägliche Kurse (11:00); 2017-11-24T12:19:49.717+01:00) + 2017-11-24T12:19:49.717+01:00 + de + + + CH + SNB + + + + + 0.8806 + CHF + -2 + 4 + + CHF + JPY + Tägliche Kurse (11:00) + + + daily + 2017-11-24 + + + + + + CH: 1.1644 CHF = 1 EUR 2017-11-24 Tägliche Kurse (11:00) + https://www.snb.ch + 1 EUR = 1.1644 CHF (Tägliche Kurse (11:00); 2017-11-24T12:19:49.710+01:00) + 2017-11-24T12:19:49.710+01:00 + de + + + CH + SNB + + + + + 1.1644 + CHF + 4 + + CHF + EUR + Tägliche Kurse (11:00) + + + daily + 2017-11-24 + + + + + + CH: 0.9809 CHF = 1 USD 2017-11-24 Tägliche Kurse (11:00) + https://www.snb.ch + 1 USD = 0.9809 CHF (Tägliche Kurse (11:00); 2017-11-24T12:19:49.703+01:00) + 2017-11-24T12:19:49.703+01:00 + de + + + CH + SNB + + + + + 0.9809 + CHF + 4 + + CHF + USD + Tägliche Kurse (11:00) + + + daily + 2017-11-24 + + + + + + CH: 1.3052 CHF = 1 GBP 2017-11-23 Tägliche Kurse (11:00) + https://www.snb.ch + 1 GBP = 1.3052 CHF (Tägliche Kurse (11:00); 2017-11-23T12:36:46.040+01:00) + 2017-11-23T12:36:46.040+01:00 + de + + + CH + SNB + + + + + 1.3052 + CHF + 4 + + CHF + GBP + Tägliche Kurse (11:00) + + + daily + 2017-11-23 + + + + + + CH: 0.8816 CHF = 100 JPY 2017-11-23 Tägliche Kurse (11:00) + https://www.snb.ch + 100 JPY = 0.8816 CHF (Tägliche Kurse (11:00); 2017-11-23T12:36:46.030+01:00) + 2017-11-23T12:36:46.030+01:00 + de + + + CH + SNB + + + + + 0.8816 + CHF + -2 + 4 + + CHF + JPY + Tägliche Kurse (11:00) + + + daily + 2017-11-23 + + + + + + CH: 1.1617 CHF = 1 EUR 2017-11-23 Tägliche Kurse (11:00) + https://www.snb.ch + 1 EUR = 1.1617 CHF (Tägliche Kurse (11:00); 2017-11-23T12:36:46.027+01:00) + 2017-11-23T12:36:46.027+01:00 + de + + + CH + SNB + + + + + 1.1617 + CHF + 4 + + CHF + EUR + Tägliche Kurse (11:00) + + + daily + 2017-11-23 + + + + + + CH: 0.9811 CHF = 1 USD 2017-11-23 Tägliche Kurse (11:00) + https://www.snb.ch + 1 USD = 0.9811 CHF (Tägliche Kurse (11:00); 2017-11-23T12:36:46.017+01:00) + 2017-11-23T12:36:46.017+01:00 + de + + + CH + SNB + + + + + 0.9811 + CHF + 4 + + CHF + USD + Tägliche Kurse (11:00) + + + daily + 2017-11-23 + + + + + + CH: 1.3109 CHF = 1 GBP 2017-11-22 Tägliche Kurse (11:00) + https://www.snb.ch + 1 GBP = 1.3109 CHF (Tägliche Kurse (11:00); 2017-11-22T12:24:04.110+01:00) + 2017-11-22T12:24:04.110+01:00 + de + + + CH + SNB + + + + + 1.3109 + CHF + 4 + + CHF + GBP + Tägliche Kurse (11:00) + + + daily + 2017-11-22 + + + + + + CH: 0.8827 CHF = 100 JPY 2017-11-22 Tägliche Kurse (11:00) + https://www.snb.ch + 100 JPY = 0.8827 CHF (Tägliche Kurse (11:00); 2017-11-22T12:24:04.103+01:00) + 2017-11-22T12:24:04.103+01:00 + de + + + CH + SNB + + + + + 0.8827 + CHF + -2 + 4 + + CHF + JPY + Tägliche Kurse (11:00) + + + daily + 2017-11-22 + + + + + + CH: 1.1633 CHF = 1 EUR 2017-11-22 Tägliche Kurse (11:00) + https://www.snb.ch + 1 EUR = 1.1633 CHF (Tägliche Kurse (11:00); 2017-11-22T12:24:04.090+01:00) + 2017-11-22T12:24:04.090+01:00 + de + + + CH + SNB + + + + + 1.1633 + CHF + 4 + + CHF + EUR + Tägliche Kurse (11:00) + + + daily + 2017-11-22 + + + + + + CH: 0.9894 CHF = 1 USD 2017-11-22 Tägliche Kurse (11:00) + https://www.snb.ch + 1 USD = 0.9894 CHF (Tägliche Kurse (11:00); 2017-11-22T12:24:04.083+01:00) + 2017-11-22T12:24:04.083+01:00 + de + + + CH + SNB + + + + + 0.9894 + CHF + 4 + + CHF + USD + Tägliche Kurse (11:00) + + + daily + 2017-11-22 + + + + + + CH: 1.3151 CHF = 1 GBP 2017-11-21 Tägliche Kurse (11:00) + https://www.snb.ch + 1 GBP = 1.3151 CHF (Tägliche Kurse (11:00); 2017-11-21T12:19:20.370+01:00) + 2017-11-21T12:19:20.370+01:00 + de + + + CH + SNB + + + + + 1.3151 + CHF + 4 + + CHF + GBP + Tägliche Kurse (11:00) + + + daily + 2017-11-21 + + + + + + CH: 0.8832 CHF = 100 JPY 2017-11-21 Tägliche Kurse (11:00) + https://www.snb.ch + 100 JPY = 0.8832 CHF (Tägliche Kurse (11:00); 2017-11-21T12:19:20.363+01:00) + 2017-11-21T12:19:20.363+01:00 + de + + + CH + SNB + + + + + 0.8832 + CHF + -2 + 4 + + CHF + JPY + Tägliche Kurse (11:00) + + + daily + 2017-11-21 + + + + + + CH: 1.1647 CHF = 1 EUR 2017-11-21 Tägliche Kurse (11:00) + https://www.snb.ch + 1 EUR = 1.1647 CHF (Tägliche Kurse (11:00); 2017-11-21T12:19:20.360+01:00) + 2017-11-21T12:19:20.360+01:00 + de + + + CH + SNB + + + + + 1.1647 + CHF + 4 + + CHF + EUR + Tägliche Kurse (11:00) + + + daily + 2017-11-21 + + + + + + CH: 0.9930 CHF = 1 USD 2017-11-21 Tägliche Kurse (11:00) + https://www.snb.ch + 1 USD = 0.9930 CHF (Tägliche Kurse (11:00); 2017-11-21T12:19:20.343+01:00) + 2017-11-21T12:19:20.343+01:00 + de + + + CH + SNB + + + + + 0.9930 + CHF + 4 + + CHF + USD + Tägliche Kurse (11:00) + + + daily + 2017-11-21 + + + + + From 9061e66151c8166002c83f931dd74f2b33dc5754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Tue, 26 Dec 2017 13:02:19 +0100 Subject: [PATCH 05/53] Duno if thats your and my config and has to be ignored but for now il commit it. --- django/.idea/django.iml | 2 +- django/.idea/misc.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django/.idea/django.iml b/django/.idea/django.iml index 6711606..0acd853 100644 --- a/django/.idea/django.iml +++ b/django/.idea/django.iml @@ -2,7 +2,7 @@ - + diff --git a/django/.idea/misc.xml b/django/.idea/misc.xml index 2c50d4f..539c015 100644 --- a/django/.idea/misc.xml +++ b/django/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file From 318d599a2f68225b61361c9c760243d18c693887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Wed, 27 Dec 2017 18:17:14 +0100 Subject: [PATCH 06/53] Add date to currencies list --- .../didgeridoo/currencies/exchange_rates.py | 2 +- .../migrations/0002_exchangerate_date.py | 20 +++++++++++++++++++ .../migrations/0003_auto_20171227_1119.py | 20 +++++++++++++++++++ django/didgeridoo/currencies/models.py | 1 + .../templates/currencies/index.html | 10 ++++++++-- django/didgeridoo/currencies/views.py | 8 +++++--- django/didgeridoo/didgeridoo/settings.py | 2 +- 7 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 django/didgeridoo/currencies/migrations/0002_exchangerate_date.py create mode 100644 django/didgeridoo/currencies/migrations/0003_auto_20171227_1119.py diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py index 2900892..db1cc6b 100644 --- a/django/didgeridoo/currencies/exchange_rates.py +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -110,7 +110,7 @@ def get_exchange_rate(): # CHFvalue, "CHF and 1 ", base_currency, " costs: ", # FOREIGNvalue_round, target_currency) exchange_rates.update( - {target_currency: FOREIGNvalue_round}) + {target_currency: FOREIGNvalue_round, "date": date}) # Print the Dictionary: # print(exchange_rates) else: diff --git a/django/didgeridoo/currencies/migrations/0002_exchangerate_date.py b/django/didgeridoo/currencies/migrations/0002_exchangerate_date.py new file mode 100644 index 0000000..37fb831 --- /dev/null +++ b/django/didgeridoo/currencies/migrations/0002_exchangerate_date.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-12-27 10:05 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('currencies', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='exchangerate', + name='date', + field=models.DateField(null=True), + ), + ] diff --git a/django/didgeridoo/currencies/migrations/0003_auto_20171227_1119.py b/django/didgeridoo/currencies/migrations/0003_auto_20171227_1119.py new file mode 100644 index 0000000..c6283a2 --- /dev/null +++ b/django/didgeridoo/currencies/migrations/0003_auto_20171227_1119.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-12-27 10:19 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('currencies', '0002_exchangerate_date'), + ] + + operations = [ + migrations.AlterField( + model_name='exchangerate', + name='date', + field=models.DateField(null=True, verbose_name='%Y-%m-%d'), + ), + ] diff --git a/django/didgeridoo/currencies/models.py b/django/didgeridoo/currencies/models.py index 1edbe06..fb6d10c 100644 --- a/django/didgeridoo/currencies/models.py +++ b/django/didgeridoo/currencies/models.py @@ -3,6 +3,7 @@ from django.db import models class ExchangeRate(models.Model): name = models.CharField(max_length=200, unique=True) + date = models.DateField('%Y-%m-%d', null=True) exchange_rate_to_chf = models.FloatField(max_length=5) def __str__(self): diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html index 3c1e8a7..50d944a 100644 --- a/django/didgeridoo/currencies/templates/currencies/index.html +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -8,11 +8,17 @@ {% if currency_list %}
      {% for currency in currency_list %} -
    • {{ currency.name }} : {{ currency.exchange_rate_to_chf }}
    • +
    • + {{ currency.date }} : + {{ currency.name }} : + {{ currency.exchange_rate_to_chf }} +
    • {% endfor %}
    {% else %} -

    No categories are available.

    +

    + Something whent wrong, no currencies are available. +

    {% endif %}
diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index 23f8952..4a4450c 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -6,17 +6,19 @@ from currencies import exchange_rates def currencies(request): # return HttpResponse("exchange_rates") raw_data = exchange_rates.get_exchange_rate() - for i, j in raw_data.items(): + for i, j, k, l in raw_data.items(): if ExchangeRate.objects.filter(name=i): e = ExchangeRate.objects.filter( name=i, ).update( - exchange_rate_to_chf=j + exchange_rate_to_chf=j, + date=l ) else: e = ExchangeRate.objects.create( name=i, - exchange_rate_to_chf=j + exchange_rate_to_chf=j, + date=l ) e.save() currency_list = ExchangeRate.objects.all() diff --git a/django/didgeridoo/didgeridoo/settings.py b/django/didgeridoo/didgeridoo/settings.py index f741185..33c98f9 100644 --- a/django/didgeridoo/didgeridoo/settings.py +++ b/django/didgeridoo/didgeridoo/settings.py @@ -32,7 +32,6 @@ ALLOWED_HOSTS = [] INSTALLED_APPS = [ 'webshop.apps.WebshopConfig', - 'currencies.apps.CurrenciesConfig', 'django_extensions', 'django.contrib.admin', 'django.contrib.auth', @@ -40,6 +39,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'currencies', ] MIDDLEWARE = [ From cea32523223c07f6bc264ffc338de1fd29005f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Wed, 27 Dec 2017 19:32:14 +0100 Subject: [PATCH 07/53] add bootstrap to ansible and vagrant for django-bootstrap3 support --- Vagrantfile | 2 +- ansible/roles/web_AI-5/tasks/main.yml | 1 + django/didgeridoo/didgeridoo/settings.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 7e8c3d7..1ee8bbe 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -30,7 +30,7 @@ Vagrant.configure("2") do |config| #zu installierende Pakete apt-get install -y apache2 python3-django mariadb-server avahi-daemon \ libnss-mdns libapache2-mod-wsgi-py3 python3-mysqldb python3-pip - pip3 install django-extensions Pillow + pip3 install django-extensions Pillow django-bootstrap3 /vagrant/ansible/roles/web_AI-5/tasks/setup_script.sh SHELL diff --git a/ansible/roles/web_AI-5/tasks/main.yml b/ansible/roles/web_AI-5/tasks/main.yml index e956179..2e067d1 100644 --- a/ansible/roles/web_AI-5/tasks/main.yml +++ b/ansible/roles/web_AI-5/tasks/main.yml @@ -27,6 +27,7 @@ name: - django-extensions - Pillow + - django-bootstrap3 executable: pip3 - name: Run the setup script to add some final touches diff --git a/django/didgeridoo/didgeridoo/settings.py b/django/didgeridoo/didgeridoo/settings.py index 155ca3d..dbe98ed 100644 --- a/django/didgeridoo/didgeridoo/settings.py +++ b/django/didgeridoo/didgeridoo/settings.py @@ -39,6 +39,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'bootstrap3' ] MIDDLEWARE = [ From 45ca9ca55e693653c6d9e118774a16b2a5a5dc23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Fri, 29 Dec 2017 15:11:45 +0100 Subject: [PATCH 08/53] unfinshed atempt to make a nav abandoned for later use maybe --- .../webshop/templates/webshop/base.html | 73 +++++++++++++++---- 1 file changed, 59 insertions(+), 14 deletions(-) diff --git a/django/didgeridoo/webshop/templates/webshop/base.html b/django/didgeridoo/webshop/templates/webshop/base.html index fa6b702..8cd2aa6 100644 --- a/django/didgeridoo/webshop/templates/webshop/base.html +++ b/django/didgeridoo/webshop/templates/webshop/base.html @@ -1,17 +1,62 @@ - - - - -
-

{% block section_title %}Music Instrument Shop{% endblock %}

- {% block content %}{% endblock %} -
- -
- {% block footer %} -

This is a case study project of Ivan Hörler and Andreas Zweili. - It is a school project/excercise and has no commercial intent.

+ + + + + + + + + {% load static %} + + {% block title %} + + Casestudy 'Webshop' IBZ TIAE-5(2017/18) + {% endblock %} -
+ + +
+
+
+

+ {% block shop_name %}Music Instruments Inc.{% endblock %} +

+
+
+
+
+
+
+ {% block nav %} + + {% endblock %} +
+
+

+ {% block section_title %}{% endblock %} +

+
+
+ {% block content %}{% endblock %} +
+
+
+
+
+
+
+ {% block footer %} + This is a case study project of Ivan Hörler and Andreas Zweili.
+ It is a school project/excercise and has no commercial intent. + {% endblock %} +
+
+
+
+ From 7bb875e6965a44c2ee5a4351ff18ca843df35565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Fri, 29 Dec 2017 15:12:29 +0100 Subject: [PATCH 09/53] selfmade css file --- django/didgeridoo/static/webshop/css/base.css | 6 ++++++ django/didgeridoo/webshop/templates/webshop/index.html | 1 + 2 files changed, 7 insertions(+) create mode 100755 django/didgeridoo/static/webshop/css/base.css diff --git a/django/didgeridoo/static/webshop/css/base.css b/django/didgeridoo/static/webshop/css/base.css new file mode 100755 index 0000000..6e68a39 --- /dev/null +++ b/django/didgeridoo/static/webshop/css/base.css @@ -0,0 +1,6 @@ + +.sidebar-nav { + margin-top: 30px; + padding: 10; + list-style: none; +} diff --git a/django/didgeridoo/webshop/templates/webshop/index.html b/django/didgeridoo/webshop/templates/webshop/index.html index 651ea42..8ddc755 100644 --- a/django/didgeridoo/webshop/templates/webshop/index.html +++ b/django/didgeridoo/webshop/templates/webshop/index.html @@ -1,4 +1,5 @@ {% extends "webshop/base.html" %} +{% block section_title %}Home{% endblock %} {% block content %} {% if category_list %}
    From 13805f790dd3a37f762792db74db45ad6f95ab70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Fri, 29 Dec 2017 17:02:33 +0100 Subject: [PATCH 10/53] add tableview in /currencies --- .../didgeridoo/currencies/exchange_rates.py | 8 ++++--- .../templates/currencies/index.html | 16 ++++++++++++++ django/didgeridoo/currencies/views.py | 21 ++++++++++--------- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py index db1cc6b..5415301 100644 --- a/django/didgeridoo/currencies/exchange_rates.py +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -53,8 +53,10 @@ def get_exchange_rate(): datetime_str = item.find('dc:date', ns).text # convert string to date object: # https://stackoverflow.com/a/12282040/4061870 + # seams like snb striked the microsecond somewhere between Nov. and + # Dez. 2017 so maybe first check time type. "%Y-%m-%dT%H:%M:%S.%f%z" date = datetime.strptime(''.join(datetime_str.rsplit(':', 1)), - "%Y-%m-%dT%H:%M:%S.%f%z").strftime("%Y-%m-%d") + "%Y-%m-%dT%H:%M:%S%z").strftime("%Y-%m-%d") # only the values of today are used so check for date: if date == today: title = item.find('none:title', ns).text @@ -110,11 +112,11 @@ def get_exchange_rate(): # CHFvalue, "CHF and 1 ", base_currency, " costs: ", # FOREIGNvalue_round, target_currency) exchange_rates.update( - {target_currency: FOREIGNvalue_round, "date": date}) + {target_currency: FOREIGNvalue_round}) # Print the Dictionary: # print(exchange_rates) else: break - return(exchange_rates) + return(exchange_rates, date) # for development its preferable to see that the for loop is done: # print('no more fresh data!') diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html index 50d944a..8e67685 100644 --- a/django/didgeridoo/currencies/templates/currencies/index.html +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -6,6 +6,22 @@

    Currencies in CHF

    {% if currency_list %} + + + + {% for currency in currency_list %} + + {% endfor %} + + + + {% for currency in currency_list %} + + {% endfor %} + +
    DATE{{ currency.name }}
    {{ date }}{{ currency.exchange_rate_to_chf }}
    +
    +
      {% for currency in currency_list %}
    • diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index 4a4450c..45c280b 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -5,23 +5,24 @@ from currencies import exchange_rates def currencies(request): # return HttpResponse("exchange_rates") - raw_data = exchange_rates.get_exchange_rate() - for i, j, k, l in raw_data.items(): - if ExchangeRate.objects.filter(name=i): + raw_data, date = exchange_rates.get_exchange_rate() + for currency, rate in raw_data.items(): + if ExchangeRate.objects.filter(name=currency): e = ExchangeRate.objects.filter( - name=i, + name=currency, ).update( - exchange_rate_to_chf=j, - date=l + exchange_rate_to_chf=rate, + date=date ) else: e = ExchangeRate.objects.create( - name=i, - exchange_rate_to_chf=j, - date=l + name=currency, + exchange_rate_to_chf=rate, + date=date ) e.save() currency_list = ExchangeRate.objects.all() return render(request, 'currencies/index.html', - {'currency_list': currency_list}) + {'currency_list': currency_list, + 'date': date}) From 19afc446ed3ae448882d50a34a166e14e131432b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Fri, 29 Dec 2017 19:26:01 +0100 Subject: [PATCH 11/53] changed view and deleted the database unique filed --- .../didgeridoo/currencies/exchange_rates.py | 8 +++++--- .../migrations/0004_auto_20171229_1708.py | 20 +++++++++++++++++++ .../migrations/0005_auto_20171229_1735.py | 20 +++++++++++++++++++ .../migrations/0006_auto_20171229_1747.py | 20 +++++++++++++++++++ .../migrations/0007_auto_20171229_1806.py | 20 +++++++++++++++++++ django/didgeridoo/currencies/models.py | 2 +- .../templates/currencies/index.html | 13 ++++++------ django/didgeridoo/currencies/views.py | 14 ++++++------- 8 files changed, 99 insertions(+), 18 deletions(-) create mode 100644 django/didgeridoo/currencies/migrations/0004_auto_20171229_1708.py create mode 100644 django/didgeridoo/currencies/migrations/0005_auto_20171229_1735.py create mode 100644 django/didgeridoo/currencies/migrations/0006_auto_20171229_1747.py create mode 100644 django/didgeridoo/currencies/migrations/0007_auto_20171229_1806.py diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py index 5415301..bb12c47 100644 --- a/django/didgeridoo/currencies/exchange_rates.py +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -55,9 +55,11 @@ def get_exchange_rate(): # https://stackoverflow.com/a/12282040/4061870 # seams like snb striked the microsecond somewhere between Nov. and # Dez. 2017 so maybe first check time type. "%Y-%m-%dT%H:%M:%S.%f%z" - date = datetime.strptime(''.join(datetime_str.rsplit(':', 1)), - "%Y-%m-%dT%H:%M:%S%z").strftime("%Y-%m-%d") - # only the values of today are used so check for date: + date = datetime.strptime(''.join( + datetime_str.rsplit(':', 1)), + "%Y-%m-%dT%H:%M:%S%z").strftime( + "%Y-%m-%d") + # only the values of today are used so check for date in XML: if date == today: title = item.find('none:title', ns).text base_currency = item.find(rate_path + diff --git a/django/didgeridoo/currencies/migrations/0004_auto_20171229_1708.py b/django/didgeridoo/currencies/migrations/0004_auto_20171229_1708.py new file mode 100644 index 0000000..ad84626 --- /dev/null +++ b/django/didgeridoo/currencies/migrations/0004_auto_20171229_1708.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-12-29 16:08 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('currencies', '0003_auto_20171227_1119'), + ] + + operations = [ + migrations.AlterField( + model_name='exchangerate', + name='name', + field=models.CharField(max_length=200), + ), + ] diff --git a/django/didgeridoo/currencies/migrations/0005_auto_20171229_1735.py b/django/didgeridoo/currencies/migrations/0005_auto_20171229_1735.py new file mode 100644 index 0000000..3ac6227 --- /dev/null +++ b/django/didgeridoo/currencies/migrations/0005_auto_20171229_1735.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-12-29 16:35 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('currencies', '0004_auto_20171229_1708'), + ] + + operations = [ + migrations.AlterField( + model_name='exchangerate', + name='date', + field=models.DateField(null=True, verbose_name='%Y-%m-%dT%H:%M:%S'), + ), + ] diff --git a/django/didgeridoo/currencies/migrations/0006_auto_20171229_1747.py b/django/didgeridoo/currencies/migrations/0006_auto_20171229_1747.py new file mode 100644 index 0000000..a2a330b --- /dev/null +++ b/django/didgeridoo/currencies/migrations/0006_auto_20171229_1747.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-12-29 16:47 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('currencies', '0005_auto_20171229_1735'), + ] + + operations = [ + migrations.AlterField( + model_name='exchangerate', + name='date', + field=models.DateTimeField(null=True, verbose_name='%Y-%m-%dT%H:%M:%S'), + ), + ] diff --git a/django/didgeridoo/currencies/migrations/0007_auto_20171229_1806.py b/django/didgeridoo/currencies/migrations/0007_auto_20171229_1806.py new file mode 100644 index 0000000..2455467 --- /dev/null +++ b/django/didgeridoo/currencies/migrations/0007_auto_20171229_1806.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-12-29 17:06 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('currencies', '0006_auto_20171229_1747'), + ] + + operations = [ + migrations.AlterField( + model_name='exchangerate', + name='date', + field=models.DateField(null=True, verbose_name='%Y-%m-%d'), + ), + ] diff --git a/django/didgeridoo/currencies/models.py b/django/didgeridoo/currencies/models.py index fb6d10c..ca6ed15 100644 --- a/django/didgeridoo/currencies/models.py +++ b/django/didgeridoo/currencies/models.py @@ -2,7 +2,7 @@ from django.db import models class ExchangeRate(models.Model): - name = models.CharField(max_length=200, unique=True) + name = models.CharField(max_length=200) date = models.DateField('%Y-%m-%d', null=True) exchange_rate_to_chf = models.FloatField(max_length=5) diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html index 8e67685..bddcee2 100644 --- a/django/didgeridoo/currencies/templates/currencies/index.html +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -13,14 +13,15 @@ {{ currency.name }} {% endfor %} - - {{ date }} - {% for currency in currency_list %} - {{ currency.exchange_rate_to_chf }} - {% endfor %} - + + {{ date }} + {% for currency in currency_list %} + {{ currency.exchange_rate_to_chf }} + {% endfor %} +
      +

      {{ message }}


        {% for currency in currency_list %} diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index 45c280b..1128eab 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -6,14 +6,10 @@ from currencies import exchange_rates def currencies(request): # return HttpResponse("exchange_rates") raw_data, date = exchange_rates.get_exchange_rate() + message = "" for currency, rate in raw_data.items(): - if ExchangeRate.objects.filter(name=currency): - e = ExchangeRate.objects.filter( - name=currency, - ).update( - exchange_rate_to_chf=rate, - date=date - ) + if ExchangeRate.objects.filter(date=date): + message = "already querried today" else: e = ExchangeRate.objects.create( name=currency, @@ -21,8 +17,10 @@ def currencies(request): date=date ) e.save() + message = "updated successfully" currency_list = ExchangeRate.objects.all() return render(request, 'currencies/index.html', {'currency_list': currency_list, - 'date': date}) + 'date': date, + 'message': message}) From d500712dc2635417cfd806c29b669b6131a28eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Fri, 29 Dec 2017 22:32:27 +0100 Subject: [PATCH 12/53] changed some of the views and implemented a more selfish perspective of a shop. For shure not ideal and in NO way DRY but a solution for now. --- django/didgeridoo/didgeridoo/settings.py | 2 +- .../webshop/templates/webshop/base.html | 51 +++++++++++++------ .../webshop/templates/webshop/category.html | 36 +++++++++---- .../webshop/templates/webshop/index.html | 44 ++++++++++------ django/didgeridoo/webshop/views.py | 28 ++++++++-- 5 files changed, 117 insertions(+), 44 deletions(-) diff --git a/django/didgeridoo/didgeridoo/settings.py b/django/didgeridoo/didgeridoo/settings.py index 67fac21..ac6bd08 100644 --- a/django/didgeridoo/didgeridoo/settings.py +++ b/django/didgeridoo/didgeridoo/settings.py @@ -23,7 +23,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '(#4#-$$&mx7(%q+6&&@-c&g%i0dc4)zfks1%sy8b%lsxspou&%' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = False +DEBUG = True ALLOWED_HOSTS = [ 'localhost', diff --git a/django/didgeridoo/webshop/templates/webshop/base.html b/django/didgeridoo/webshop/templates/webshop/base.html index c1d1e54..bb41953 100644 --- a/django/didgeridoo/webshop/templates/webshop/base.html +++ b/django/didgeridoo/webshop/templates/webshop/base.html @@ -16,34 +16,55 @@ {% endblock %} -
        - Home | - {% if user.is_authenticated %} - Profile | Logout - {% else %} - Login - {% endif %} -

        {% block section_title %}Music Instrument Shop{% endblock %}

        - {% block content %}{% endblock %} -

        {% block shop_name %}Music Instruments Inc.{% endblock %}

        +
        + {% block search %}{% endblock %} +
        +
        - {% block nav %} -
        diff --git a/django/didgeridoo/webshop/templates/webshop/category.html b/django/didgeridoo/webshop/templates/webshop/category.html index 373f03f..bb6a535 100644 --- a/django/didgeridoo/webshop/templates/webshop/category.html +++ b/django/didgeridoo/webshop/templates/webshop/category.html @@ -1,13 +1,31 @@ {% extends "webshop/base.html" %} {% block section_title %}Category Overview{% endblock %} {% block content %} - {% if article_list %} - - {% else %} -

        There are no articles in this category.

        - {% endif %} + {% if article_list %} + + + + + + + + + {% for article in article_list %} + + + + + + + + {% endfor %} +
        IDNAMECATHEGORYSTOCKPRICE
        {{ article.id }} + + {{ article.name }} + {{ article.category }}{{ article.stock }}{{ article.price_in_chf }}
        + {% else %} +

        + Something whent wrong, no articles are stored. +

        + {% endif %} {% endblock %} diff --git a/django/didgeridoo/webshop/templates/webshop/index.html b/django/didgeridoo/webshop/templates/webshop/index.html index 8ddc755..7f661bd 100644 --- a/django/didgeridoo/webshop/templates/webshop/index.html +++ b/django/didgeridoo/webshop/templates/webshop/index.html @@ -1,18 +1,32 @@ {% extends "webshop/base.html" %} -{% block section_title %}Home{% endblock %} +{% block section_title %}Articles{% endblock %} {% block content %} - {% if category_list %} -
          - {% for category, sub_category in category_list.items %} -
        • {{ category.name }}
        • - {% for i in sub_category %} - - {% endfor %} - {% endfor %} -
        - {% else %} -

        No categories are available.

        - {% endif %} + {% if articles_list %} + + + + + + + + + {% for article in articles_list %} + + + + + + + + {% endfor %} +
        IDNAMECATHEGORYSTOCKPRICE
        {{ article.id }} + + {{ article.name }} + + {{ article.category }}{{ article.stock }}{{ article.price_in_chf }}
        + {% else %} +

        + Something whent wrong, no articles are stored. +

        + {% endif %} {% endblock %} diff --git a/django/didgeridoo/webshop/views.py b/django/didgeridoo/webshop/views.py index 499c261..db2462e 100644 --- a/django/didgeridoo/webshop/views.py +++ b/django/didgeridoo/webshop/views.py @@ -12,6 +12,8 @@ from webshop.forms import RegistrationForm def index(request): parent_category_list = Category.objects.filter(parent_category=None) category_list = {} + hidden = ArticleStatus.objects.get(name="hidden") + articles_list = Article.objects.all().exclude(status=hidden.id) for i in parent_category_list: category_list.update( @@ -19,7 +21,8 @@ def index(request): return render(request, 'webshop/index.html', - {'category_list': category_list}) + {'category_list': category_list, + 'articles_list': articles_list}) def articles_in_category(request, category_id): @@ -29,16 +32,33 @@ def articles_in_category(request, category_id): article_list = Article.objects.filter( category=selected_category.id).exclude(status=hidden.id) + parent_category_list = Category.objects.filter(parent_category=None) + category_list = {} + + for i in parent_category_list: + category_list.update( + {i: Category.objects.filter(parent_category=i.id)}) + return render(request, 'webshop/category.html', {'article_list': article_list, + 'category_list': category_list, 'category': selected_category}) def article_details(request, article_id): - article = get_object_or_404(Article, pk=article_id) - return render(request, 'webshop/article_details.html', - {'article': article}) + parent_category_list = Category.objects.filter(parent_category=None) + category_list = {} + + for i in parent_category_list: + category_list.update( + {i: Category.objects.filter(parent_category=i.id)}) + + article = get_object_or_404(Article, pk=article_id) + + return render(request, 'webshop/article_details.html', + {'article': article, + 'category_list': category_list}) @login_required def profile(request): From 50b16ec8423e4041e5395241a1d7aa592d582b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Tue, 2 Jan 2018 14:51:06 +0100 Subject: [PATCH 13/53] commit for history. going to implement new databasestructure now. --- .../didgeridoo/currencies/exchange_rates.py | 84 ++++++++--------- .../templates/currencies/index.html | 90 +++++++++++++++++-- django/didgeridoo/currencies/views.py | 71 +++++++++++++-- django/didgeridoo/didgeridoo/settings.py | 2 +- django/didgeridoo/rss | 8 +- 5 files changed, 193 insertions(+), 62 deletions(-) diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py index bb12c47..173de19 100644 --- a/django/didgeridoo/currencies/exchange_rates.py +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -1,14 +1,15 @@ from datetime import datetime import urllib.request import xml.etree.ElementTree as ET +import datetime as dt -today = datetime.now().strftime("%Y-%m-%d") -""" this method calls a rss/XML Resource - of Currency's and parses it to our - needed exchange rate values. - The return is a dictionary carring - Key:Value pairs of new currencys. +""" +this method calls a rss/XML Resource +of Currency's and parses it to our +needed exchange rate values. +The return is a dictionary carring +Key:Value pairs of new currencys. """ @@ -20,16 +21,17 @@ def get_exchange_rate(): # ~~~~~~~~~~~~~~~~~~~~~ # Online Resource block: # ~~~~~~~~~~~~~~~~~~~~~ - SNB_URL = 'https://www.snb.ch/selector/de/mmr/exfeed/rss' - urlsocket = urllib.request.urlopen(SNB_URL) - root = ET.parse(urlsocket) - root = ET.ElementTree(root) + # SNB_URL = 'https://www.snb.ch/selector/de/mmr/exfeed/rss' + # urlsocket = urllib.request.urlopen(SNB_URL) + # root = ET.parse(urlsocket) + # root = ET.ElementTree(root) # ~~~~~~~~~~~~~~~~~~~~~ # development block: # ~~~~~~~~~~~~~~~~~~~~~ - # root = ET.ElementTree(file='rss') + root = ET.ElementTree(file='rss') # ~~~~~~~~~~~~~~~~~~~~~ + # Namespaces ns = {'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'none': 'http://purl.org/rss/1.0/', @@ -38,43 +40,45 @@ def get_exchange_rate(): 'cb': 'http://www.cbwiki.net/wiki/index.php/Specification_1.2/' } # Pathvariables to XML Namespaces - none_path = 'none:item/' rate_path = 'cb:statistics/cb:exchangeRate/' observation_path = 'cb:statistics/cb:exchangeRate/cb:observation/' - # THE FILE DATE: - xml_datetime_string = root.find('none:channel/dcterms:created', ns).text - # because of few knowlede just trim end of string to avoid error - xml_datestring = xml_datetime_string.split('T')[0] - # parse string to date object: - xml_date = datetime.date(datetime.strptime(xml_datestring, "%Y-%m-%d")) + # today = datetime.now().strftime("%Y-%m-%d") + today = "2018-01-02" exchange_rates = {} + for item in root.findall('none:item', ns): # THE CURRENCY DATE: datetime_str = item.find('dc:date', ns).text # convert string to date object: # https://stackoverflow.com/a/12282040/4061870 # seams like snb striked the microsecond somewhere between Nov. and - # Dez. 2017 so maybe first check time type. "%Y-%m-%dT%H:%M:%S.%f%z" - date = datetime.strptime(''.join( - datetime_str.rsplit(':', 1)), - "%Y-%m-%dT%H:%M:%S%z").strftime( - "%Y-%m-%d") + # Dez. 2017 so maybe first check time type is with milliseconds: + try: + date = datetime.strptime(''.join( + datetime_str.rsplit(':', 1)), + "%Y-%m-%dT%H:%M:%S.%f%z").strftime( + "%Y-%m-%d") + except Exception as e: + print('%s (%s)' % (e, type(e))) + try: + date = datetime.strptime(''.join( + datetime_str.rsplit(':', 1)), + "%Y-%m-%dT%H:%M:%S%z").strftime( + "%Y-%m-%d") + except Exception as e: + print('%s (%s)' % (e, type(e))) + # Print dates for development: + # print("date:", date, "today:", today) # only the values of today are used so check for date in XML: if date == today: - title = item.find('none:title', ns).text - base_currency = item.find(rate_path + - 'cb:baseCurrency', ns).text target_currency = item.find(rate_path + 'cb:targetCurrency', ns).text - CHFvalue = float(item.find(observation_path + - 'cb:value', ns).text) - CHFvalue = float(CHFvalue) # convert to float - FOREIGNvalue = CHFvalue # copy to new value to have both. - unit = item.find(observation_path + 'cb:unit', ns).text - decimals = int(item.find(observation_path + - 'cb:decimals', ns).text) + value = float(item.find(observation_path + + 'cb:value', ns).text) + value = float(value) # convert to float + foreign_value = value # copy to new value to have both. # because it's dangerous to check for present, i check for none - # here and have to do something in there so i set the target to 0. + # here and have to do something in there so i set the target to 1. if item.find(observation_path + 'cb:unit_mult', ns) is None: unit_mult = float("1.0") else: @@ -104,21 +108,21 @@ def get_exchange_rate(): unit_mult = '1000000' unit_mult = float(unit_mult) # convert to float # calculate the Currency to CHF: - FOREIGNvalue = 1 / CHFvalue - FOREIGNvalue *= unit_mult - CHFvalue = CHFvalue / unit_mult + foreign_value = 1 / value + foreign_value *= unit_mult + value = value / unit_mult # truncate it to decimal values provided by the xml: - FOREIGNvalue_round = round(FOREIGNvalue, 5) + foreign_value_round = round(foreign_value, 5) # Print nice setup of all calculated currencys for Dev: # print("date:", date, " 1 ", target_currency, " costs: ", # CHFvalue, "CHF and 1 ", base_currency, " costs: ", # FOREIGNvalue_round, target_currency) exchange_rates.update( - {target_currency: FOREIGNvalue_round}) + {target_currency: foreign_value_round}) # Print the Dictionary: # print(exchange_rates) else: break - return(exchange_rates, date) + return(exchange_rates, today) # for development its preferable to see that the for loop is done: # print('no more fresh data!') diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html index bddcee2..d61c474 100644 --- a/django/didgeridoo/currencies/templates/currencies/index.html +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -6,20 +6,24 @@

        Currencies in CHF

        {% if currency_list %} - + +

        {{ message }}


        @@ -32,11 +36,81 @@ {% endfor %} +
        + + raw_data +
          + {% for key, value in raw_data.items %} +
        • + {{ key }} : + {{ value }} +
        • + {% endfor %} +
        {% else %}

        - Something whent wrong, no currencies are available. + Something whent totaly wrong.

        {% endif %} +
        + today +
          +
        • + {{ today }} +
        • +
        +
        + unique_dates_list +
          + {% for key in unique_dates_list %} +
        • + {{ key }} +
        • + {% endfor %} +
        +
        + unique_currencies_list +
          + {% for key in unique_currencies_list %} +
        • + {{ key }} +
        • + {% endfor %} +
        +
        + count_date +
          +
        • + {{ count_date }} +
        • +
        +
        + count_currencies +
          +
        • + {{ count_currencies }} +
        • +
        +
        + currencies_list +
          + {% for key in currencies_list.values %} +
        • + {{ key }} +
        • + {% endfor %} +
        + currency_dict +
          + {% for key, value in currency_dict %} +
        • + {{ key }} +
        • +
        • + {{ value }} +
        • + {% endfor %} +
        diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index 1128eab..b2c2b63 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -4,23 +4,76 @@ from currencies import exchange_rates def currencies(request): - # return HttpResponse("exchange_rates") - raw_data, date = exchange_rates.get_exchange_rate() - message = "" + # this function fetches the data from exchange_rates.py + # evaluates if the values are already stored and + # prepares the view all dynamicaly. + # It can grow in terms of more Currencies over time automaticaly. + raw_data, today = exchange_rates.get_exchange_rate() + message_no = "Already querried today: " + message_yes = " Updated successfully: " for currency, rate in raw_data.items(): - if ExchangeRate.objects.filter(date=date): - message = "already querried today" + if ExchangeRate.objects.filter(date=today, name=currency)[:1]: + message_no += currency + ", " else: e = ExchangeRate.objects.create( name=currency, exchange_rate_to_chf=rate, - date=date + date=today ) e.save() - message = "updated successfully" - currency_list = ExchangeRate.objects.all() + message_yes += currency + ", " + + # prepare messages: + message_no = message_no[::-1] # invert the string + message_no = message_no.replace(",", "!", 1) # replace first , with ! + message_no = message_no[::-1] # invert the string back + message_yes = message_yes[::-1] # invert the string + message_yes = message_yes.replace(",", "!", 1) # replace first , with ! + message_yes = message_yes[::-1] # invert the string back + + if len(message_no) > 24 and len(message_yes) > 23: + message = message_no + message_yes + elif len(message_no) > 24: + message = message_no + elif len(message_yes) > 23: + message = message_yes + else: + message = "something whent wrong" + + # prepare data to be displayed in a html table: + # https://stackoverflow.com/questions/8749158/removing-duplicates-from-dictionary#8749473 + # atomar_dates + # A: https://stackoverflow.com/questions/37205793/django-values-list-vs-values#37205928 + # B: https://stackoverflow.com/questions/6521892/how-to-access-a-dictionary-key-value-present-inside-a-list + unique_dates_list = ExchangeRate.objects.values_list('date', flat=True).distinct() + # atomar_currenies + unique_currencies_list = ExchangeRate.objects.values_list('name', flat=True).distinct() + # search for currencies in a date and apend them to the list + currency_list = [] + count_date = 0 + count_currencies = 0 + for unique_date in unique_dates_list: + count_date += 1 + currency_dict = {} + currency_dict['date'] = unique_date + for unique_currency in unique_currencies_list: + count_currencies += 1 + try: + temp = ExchangeRate.objects.filter(date=unique_date, name=unique_currency).values() #A + exchange_rate_to_chf = temp[0]['exchange_rate_to_chf'] + currency_dict = currency_dict.update({unique_currency: exchange_rate_to_chf}) #B + except Exception as e: + print('%s (%s)' % (e, type(e))) + currency_list.append(currency_dict) + assert False return render(request, 'currencies/index.html', {'currency_list': currency_list, - 'date': date, + 'raw_data': raw_data, + 'today': today, + 'unique_dates_list': unique_dates_list, + 'unique_currencies_list': unique_currencies_list, + 'count_date': count_date, + 'count_currencies': count_currencies, + 'currency_dict': currency_dict, 'message': message}) diff --git a/django/didgeridoo/didgeridoo/settings.py b/django/didgeridoo/didgeridoo/settings.py index 61bc7e1..f142821 100644 --- a/django/didgeridoo/didgeridoo/settings.py +++ b/django/didgeridoo/didgeridoo/settings.py @@ -23,7 +23,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '(#4#-$$&mx7(%q+6&&@-c&g%i0dc4)zfks1%sy8b%lsxspou&%' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = False +DEBUG = True ALLOWED_HOSTS = [ 'localhost', diff --git a/django/didgeridoo/rss b/django/didgeridoo/rss index af36b76..009f10e 100644 --- a/django/didgeridoo/rss +++ b/django/didgeridoo/rss @@ -37,7 +37,7 @@ CH: 1.3081 CHF = 1 GBP 2017-11-27 Tägliche Kurse (11:00)https://www.snb.ch1 GBP = 1.3081 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.767+01:00) - 2017-12-19T12:16:53.767+01:00 + 2018-01-02T12:16:53.767+01:00de @@ -66,7 +66,7 @@ CH: 0.8813 CHF = 100 JPY 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 100 JPY = 0.8813 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.760+01:00) - 2017-12-19T12:16:53.760+01:00 + 2018-01-02T12:16:53.760+01:00 de @@ -96,7 +96,7 @@ CH: 1.1697 CHF = 1 EUR 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 1 EUR = 1.1697 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.750+01:00) - 2017-12-19T12:16:53.750+01:00 + 2018-01-02T12:16:53.750+01:00 de @@ -125,7 +125,7 @@ CH: 0.9803 CHF = 1 USD 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 1 USD = 0.9803 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.737+01:00) - 2017-11-29T12:16:53.737+01:00 + 2018-01-02T12:16:53.737+01:00 de From 47ed36e3afa453e1dacf3cba7ca446089706cf81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Wed, 3 Jan 2018 08:34:25 +0100 Subject: [PATCH 14/53] vagrant provision does not work so i need to commit unsolved files --- .../didgeridoo/currencies/exchange_rates.py | 6 +- django/didgeridoo/currencies/models.py | 18 ++- .../templates/currencies/index.html | 21 ++-- django/didgeridoo/currencies/views.py | 109 ++++++++++++------ django/didgeridoo/rss | 8 +- 5 files changed, 105 insertions(+), 57 deletions(-) diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py index 173de19..bbc50a6 100644 --- a/django/didgeridoo/currencies/exchange_rates.py +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -25,11 +25,12 @@ def get_exchange_rate(): # urlsocket = urllib.request.urlopen(SNB_URL) # root = ET.parse(urlsocket) # root = ET.ElementTree(root) - + # today = datetime.now().strftime("%Y-%m-%d") # ~~~~~~~~~~~~~~~~~~~~~ # development block: # ~~~~~~~~~~~~~~~~~~~~~ root = ET.ElementTree(file='rss') + today = "2018-01-01" # ~~~~~~~~~~~~~~~~~~~~~ # Namespaces @@ -42,8 +43,7 @@ def get_exchange_rate(): # Pathvariables to XML Namespaces rate_path = 'cb:statistics/cb:exchangeRate/' observation_path = 'cb:statistics/cb:exchangeRate/cb:observation/' - # today = datetime.now().strftime("%Y-%m-%d") - today = "2018-01-02" + exchange_rates = {} for item in root.findall('none:item', ns): diff --git a/django/didgeridoo/currencies/models.py b/django/didgeridoo/currencies/models.py index ca6ed15..e9fe0e7 100644 --- a/django/didgeridoo/currencies/models.py +++ b/django/didgeridoo/currencies/models.py @@ -1,9 +1,23 @@ from django.db import models +class ExchangeRate_name(models.Model): + name = models.CharField(max_length=200, unique=True) + + def __str__(self): + return self.name + + +class ExchangeRate_date(models.Model): + date = models.DateField('%Y-%m-%d', unique_for_date=True) + + def __str__(self): + return str(self.date) + + class ExchangeRate(models.Model): - name = models.CharField(max_length=200) - date = models.DateField('%Y-%m-%d', null=True) + name = models.ForeignKey(ExchangeRate_name) + date = models.ForeignKey(ExchangeRate_date) exchange_rate_to_chf = models.FloatField(max_length=5) def __str__(self): diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html index d61c474..d466c35 100644 --- a/django/didgeridoo/currencies/templates/currencies/index.html +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -23,15 +23,19 @@ {% endifchanged %} {% endfor %}
        --> - + {% else %} +

        + currency_list missing. +

        + {% endif %}

        {{ message }}


          {% for currency in currency_list %}
        • - {{ currency.date }} : - {{ currency.name }} : + {{ currency.date.date }} : + {{ currency.name.name }} : {{ currency.exchange_rate_to_chf }}
        • {% endfor %} @@ -47,11 +51,6 @@ {% endfor %}
        - {% else %} -

        - Something whent totaly wrong. -

        - {% endif %}
        today
          @@ -78,11 +77,9 @@ {% endfor %}

        - count_date + count_raw_data
          -
        • - {{ count_date }} -
        • +
        • {{ count_raw_data }}

        count_currencies diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index b2c2b63..774513a 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -1,5 +1,5 @@ from django.shortcuts import render -from currencies.models import ExchangeRate +from currencies.models import ExchangeRate, ExchangeRate_date, ExchangeRate_name from currencies import exchange_rates @@ -11,17 +11,53 @@ def currencies(request): raw_data, today = exchange_rates.get_exchange_rate() message_no = "Already querried today: " message_yes = " Updated successfully: " + count_raw_data = 0 for currency, rate in raw_data.items(): - if ExchangeRate.objects.filter(date=today, name=currency)[:1]: + count_raw_data += 1 + if ExchangeRate_date.objects.filter(date__date=today) \ + and ExchangeRate_name.objects.get(name=currency): message_no += currency + ", " + # A: https://stackoverflow.com/a/27802801/4061870 else: - e = ExchangeRate.objects.create( - name=currency, - exchange_rate_to_chf=rate, - date=today - ) - e.save() - message_yes += currency + ", " + if ExchangeRate_date.objects.filter(date=today)[:1]: + try: + date_dict = ExchangeRate_date.objects.filter(date=today).values() + date = date_dict[0]['date'] + date_id = date_dict[0]['id'] + except Exception as e: + print('date_dict %s (%s)' % (e, type(e))) + else: + try: + exdate = ExchangeRate_date.objects.create(date=today) + exdate.save() + except Exception as e: + print('exdate %s (%s)' % (e, type(e))) + if ExchangeRate_name.objects.filter(name=currency)[:1]: + try: + name_dict = ExchangeRate_name.objects.get(name=currency) + name = name_dict[0]['name'] + name_id = name_dict[0]['id'] + except Exception as e: + print('exdate %s (%s)' % (e, type(e))) + else: + try: + exname = ExchangeRate_name.objects.create(name=currency) + exname.save() + except Exception as e: + print('exname %s (%s)' % (e, type(e))) + try: + exrate = ExchangeRate.objects.create( + # name_id=name_id, + name_id=ExchangeRate_name.objects.only('id').get(name=currency).id, + # date_id=date_id, + date_id=ExchangeRate_date.objects.only('id').get(date=today).id, + exchange_rate_to_chf=rate, + ) + exrate.save() + message_yes += currency + ", " + + except Exception as e: + print('exrate %s (%s)' % (e, type(e))) # prepare messages: message_no = message_no[::-1] # invert the string @@ -39,41 +75,42 @@ def currencies(request): message = message_yes else: message = "something whent wrong" - + currency_list = ExchangeRate.objects.all() # prepare data to be displayed in a html table: # https://stackoverflow.com/questions/8749158/removing-duplicates-from-dictionary#8749473 # atomar_dates # A: https://stackoverflow.com/questions/37205793/django-values-list-vs-values#37205928 # B: https://stackoverflow.com/questions/6521892/how-to-access-a-dictionary-key-value-present-inside-a-list - unique_dates_list = ExchangeRate.objects.values_list('date', flat=True).distinct() - # atomar_currenies - unique_currencies_list = ExchangeRate.objects.values_list('name', flat=True).distinct() - # search for currencies in a date and apend them to the list - currency_list = [] - count_date = 0 - count_currencies = 0 - for unique_date in unique_dates_list: - count_date += 1 - currency_dict = {} - currency_dict['date'] = unique_date - for unique_currency in unique_currencies_list: - count_currencies += 1 - try: - temp = ExchangeRate.objects.filter(date=unique_date, name=unique_currency).values() #A - exchange_rate_to_chf = temp[0]['exchange_rate_to_chf'] - currency_dict = currency_dict.update({unique_currency: exchange_rate_to_chf}) #B - except Exception as e: - print('%s (%s)' % (e, type(e))) - currency_list.append(currency_dict) - assert False + # dates_list = ExchangeRate_date.objects.values_list('date', flat=True) + # # atomar_currenies + # currencies_list = ExchangeRate_name.objects.values_list('name', flat=True) + # # search for currencies in a date and apend them to the list + # currency_list = [] + # count_date = 0 + # count_currencies = 0 + # for date in dates_list: + # count_date += 1 + # currency_dict = {} + # currency_dict['date'] = date + # for currency in currencies_list: + # count_currencies += 1 + # try: + # temp = ExchangeRate.objects.objects.only('exchange_rate_to_chf').get(name=currency).id + # #temp = ExchangeRate.objects.filter(date=unique_date, name=currency).values() # A + # exchange_rate_to_chf = temp[0]['exchange_rate_to_chf'] + # currency_dict = currency_dict.update({currency: exchange_rate_to_chf}) # B + # except Exception as e: + # print('%s (%s)' % (e, type(e))) + # currency_list.append(currency_dict) + # assert False return render(request, 'currencies/index.html', {'currency_list': currency_list, 'raw_data': raw_data, 'today': today, - 'unique_dates_list': unique_dates_list, - 'unique_currencies_list': unique_currencies_list, - 'count_date': count_date, - 'count_currencies': count_currencies, - 'currency_dict': currency_dict, + # 'unique_dates_list': unique_dates_list, + # 'unique_currencies_list': unique_currencies_list, + 'count_raw_data': count_raw_data, + # 'count_currencies': count_currencies, + # 'currency_dict': currency_dict, 'message': message}) diff --git a/django/didgeridoo/rss b/django/didgeridoo/rss index 009f10e..b1dc21a 100644 --- a/django/didgeridoo/rss +++ b/django/didgeridoo/rss @@ -37,7 +37,7 @@ CH: 1.3081 CHF = 1 GBP 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 1 GBP = 1.3081 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.767+01:00) - 2018-01-02T12:16:53.767+01:00 + 2018-01-01T12:16:53.767+01:00 de @@ -66,7 +66,7 @@ CH: 0.8813 CHF = 100 JPY 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 100 JPY = 0.8813 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.760+01:00) - 2018-01-02T12:16:53.760+01:00 + 2018-01-01T12:16:53.760+01:00 de @@ -96,7 +96,7 @@ CH: 1.1697 CHF = 1 EUR 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 1 EUR = 1.1697 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.750+01:00) - 2018-01-02T12:16:53.750+01:00 + 2018-01-01T12:16:53.750+01:00 de @@ -125,7 +125,7 @@ CH: 0.9803 CHF = 1 USD 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 1 USD = 0.9803 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.737+01:00) - 2018-01-02T12:16:53.737+01:00 + 2018-01-01T12:16:53.737+01:00 de From 67707415b3ca0afe7a81811ce6535abb8f9ce781 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Wed, 3 Jan 2018 15:12:21 +0100 Subject: [PATCH 15/53] update the stakeholder diagramm --- docs/diagrammes/stakeholder_diagramm.eps | 529 +++++++++++++---------- docs/diagrammes/stakeholder_diagramm.svg | 234 ++++++++-- 2 files changed, 493 insertions(+), 270 deletions(-) diff --git a/docs/diagrammes/stakeholder_diagramm.eps b/docs/diagrammes/stakeholder_diagramm.eps index 541de38..20a4436 100644 --- a/docs/diagrammes/stakeholder_diagramm.eps +++ b/docs/diagrammes/stakeholder_diagramm.eps @@ -1,10 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: cairo 1.15.8 (http://cairographics.org) -%%CreationDate: Sun Dec 3 22:31:27 2017 +%%Creator: cairo 1.14.10 (http://cairographics.org) +%%CreationDate: Wed Jan 3 15:10:48 2018 %%Pages: 1 %%DocumentData: Clean7Bit %%LanguageLevel: 2 -%%BoundingBox: 0 0 397 397 +%%BoundingBox: 0 -1 397 439 %%EndComments %%BeginProlog save @@ -74,14 +74,17 @@ save 0 1 255 { Encoding exch /.notdef put } for Encoding 32 /space put Encoding 65 /A put +Encoding 66 /B put +Encoding 69 /E put Encoding 73 /I put +Encoding 76 /L put +Encoding 77 /M put Encoding 78 /N put Encoding 80 /P put Encoding 85 /U put Encoding 87 /W put Encoding 97 /a put Encoding 98 /b put -Encoding 99 /c put Encoding 100 /d put Encoding 101 /e put Encoding 102 /f put @@ -101,7 +104,7 @@ Encoding 116 /t put Encoding 117 /u put Encoding 122 /z put Encoding 196 /Adieresis put -/CharStrings 30 dict dup begin +/CharStrings 33 dict dup begin /.notdef 0 def /P 1 def /r 2 def @@ -126,18 +129,21 @@ Encoding 196 /Adieresis put /W 21 def /b 22 def /p 23 def -/A 24 def +/E 24 def /g 25 def -/i 26 def -/N 27 def -/c 28 def -/z 29 def +/B 26 def +/z 27 def +/i 28 def +/M 29 def +/L 30 def +/A 31 def +/N 32 def end readonly def /sfnts [ -<0001000000090080000300106376742000691d390000143c000001fe6670676d7134766a0000 -163c000000ab676c7966917ef1dd0000009c000013a0686561640d13be36000016e800000036 -686865610d9f078c0000172000000024686d747888930bac000017440000007c6c6f63610001 -2c68000017c0000000806d617870048c06710000184000000020707265703b07f10000001860 +<0001000000090080000300106376742000691d39000015f4000001fe6670676d7134766a0000 +17f4000000ab676c7966134472590000009c00001558686561640d1447cc000018a000000036 +686865610d9f078f000018d800000024686d74789a140e5f000018fc000000886c6f63610001 +675c000019840000008c6d617870048f067100001a1000000020707265703b07f10000001a30 0000056800020066fe96046605a400030007001a400c04fb0006fb0108057f0204002fc4d4ec 310010d4ecd4ec301311211125211121660400fc73031bfce5fe96070ef8f2720629000200c9 0000048d05d500080013003a40180195100095098112100a0802040005190d3f11001c090414 @@ -210,8 +216,8 @@ bbab000100c100000179061400030022b7009702010800460410fcec31002fec30400d100540 003840191ab9000e14b905088c0eb801970317040008024711120b451d10fcecf4ec32323100 2fece4f4c4ec10c4ee30b6601e801ea01e03015d0111331123350e0123220211100033321601 141633323635342623220603a2b8b83ab17ccbff00ffcb7cb1fdc7a79292a8a89292a703b602 -5ef9eca86461014401080108014461fe15cbe7e7cbcbe7e7ffff001000000568074e12260018 -00001107001e04bc01750014b40a120d05072b400930123f0d00120f0d045d310000000200ae +5ef9eca86461014401080108014461fe15cbe7e7cbcbe7e7ffff001000000568074e1226001f +00001107002104bc01750014b40a120d05072b400930123f0d00120f0d045d310000000200ae ffe30458047b00130014003b401c030900030e0106870e118c0a01bc14b80c0d0908140b4e02 0800461510fcecf439ec3231002fe4e432f4c4ec1112173930b46f15c01502015d1311331114 163332363511331123350e0123222601aeb87c7c95adb8b843b175c1c801cf01ba02a6fd619f @@ -237,312 +243,389 @@ cc00ffffcc7bb13ab9b9022fcbe7e7cbcbe7e702526461febcfef8fef8febc6164a806140002 000802461d10fcec3232f4ec310010e4e4e4f4c4ec10c4ee304009601e801ea01ee01e04015d 2511231133153e013332001110022322260134262322061514163332360173b9b93ab17bcc00 ffffcc7bb10238a79292a7a79292a7a8fdae060aaa6461febcfef8fef8febc6101ebcbe7e7cb -cbe7e7000000000200100000056805d50002000a00c240410011010004050402110505040111 -0a030a0011020003030a0711050406110505040911030a08110a030a42000307950103810905 -09080706040302010009050a0b10d4c4173931002f3ce4d4ec1239304b5358071005ed0705ed -071005ed0705ed071008ed071005ed071005ed071008ed5922b2200c01015d40420f010f020f -070f080f005800760070008c000907010802060309041601190256015802500c670168027801 -76027c0372047707780887018802800c980299039604175d005d090121013301230321032302 -bcfeee0225fe7be50239d288fd5f88d5050efd1903aefa2b017ffe81000000020071fe56045a -047b000b0028004a4023190c1d0912861316b90f03b92623b827bc09b90fbd1a1d261900080c -4706121220452910fcc4ecf4ec323231002fc4e4ece4f4c4ec10fed5ee1112393930b6602a80 -2aa02a03015d01342623220615141633323617100221222627351e013332363d010e01232202 -11101233321617353303a2a59594a5a59495a5b8fefefa61ac51519e52b5b439b27ccefcfcce -7cb239b8023dc8dcdcc8c7dcdcebfee2fee91d1eb32c2abdbf5b6362013a01030104013a6263 -aa00000200c100000179061400030007002b400e06be04b100bc020501080400460810fc3cec -3231002fe4fcec30400b1009400950096009700905015d1333112311331523c1b8b8b8b80460 -fba00614e900000100c90000053305d500090079401e071101020102110607064207020300af -0805060107021c0436071c00040a10fcecfcec11393931002f3cec323939304b5358071004ed -071004ed5922b21f0b01015d40303602380748024707690266078002070601090615011a0646 -0149065701580665016906790685018a0695019a069f0b105d005d13210111331121011123c9 -01100296c4fef0fd6ac405d5fb1f04e1fa2b04e1fb1f00010071ffe303e7047b0019003f401b -00860188040e860d880ab91104b917b8118c1a07120d004814451a10fce432ec310010e4f4ec -10fef4ee10f5ee30400b0f1b101b801b901ba01b05015d01152e012322061514163332363715 -0e0123220011100021321603e74e9d50b3c6c6b3509d4e4da55dfdfed6012d010655a20435ac -2b2be3cdcde32b2baa2424013e010e0112013a23000000010058000003db04600009009d401a +cbe7e7000000000100c90000048b05d5000b002e401506950402950081089504ad0a05010907 +031c00040c10fcec32d4c4c431002fececf4ec10ee30b21f0d01015d13211521112115211121 +1521c903b0fd1a02c7fd3902f8fc3e05d5aafe46aafde3aa000000020071fe56045a047b000b +0028004a4023190c1d0912861316b90f03b92623b827bc09b90fbd1a1d261900080c47061212 +20452910fcc4ecf4ec323231002fc4e4ece4f4c4ec10fed5ee1112393930b6602a802aa02a03 +015d01342623220615141633323617100221222627351e013332363d010e0123220211101233 +321617353303a2a59594a5a59495a5b8fefefa61ac51519e52b5b439b27ccefcfcce7cb239b8 +023dc8dcdcc8c7dcdcebfee2fee91d1eb32c2abdbf5b6362013a01030104013a6263aa000003 +00c9000004ec05d5000800110020004340231900950a0995128101950aad1f110b080213191f +05000e1c1605191c2e09001c12042110fcec32fcecd4ec111739393931002fececf4ec10ee39 +30b20f2201015d01112132363534262301112132363534262325213216151406071e01151404 +232101930144a39d9da3febc012b94919194fe0b0204e7fa807c95a5fef0fbfde802c9fddd87 +8b8c850266fe3e6f727170a6c0b189a21420cb98c8da00010058000003db04600009009d401a 081102030203110708074208a900bc03a905080301000401060a10dc4bb00b544bb00c545b58 b90006ffc038594bb0135458b9000600403859c432c411393931002fecf4ec304b5358071005 ed071005ed592201404205021602260247024907050b080f0b18031b082b08200b3603390830 0b400140024503400440054308570359085f0b6001600266036004600562087f0b800baf0b1b 5d005d1321150121152135012171036afd4c02b4fc7d02b4fd650460a8fcdb93a80325000002 -fcd7050eff2905d90003000700a5400d0400ce0602080164000564040810d4fcdcec310010d4 -3cec3230004bb00e544bb011545b58bd00080040000100080008ffc03811373859014bb00e54 -4bb00d545b4bb017545b58bd0008ffc000010008000800403811373859014bb011544bb01954 -5b58bd00080040000100080008ffc03811373859004bb0185458bd0008ffc000010008000800 -40381137385940116001600260056006700170027005700608015d0133152325331523fe5ecb -cbfe79cbcb05d9cbcbcb0000013500b800cb00cb00c100aa009c01a600b800660000007100cb -00a002b20085007500b800c301cb0189022d00cb00a600f000d300aa008700cb03aa0400014a -003300cb000000d9050200f4015400b4009c01390114013907060400044e04b4045204b804e7 -04cd0037047304cd04600473013303a2055605a60556053903c5021200c9001f00b801df0073 -00ba03e9033303bc0444040e00df03cd03aa00e503aa0404000000cb008f00a4007b00b80014 -016f007f027b0252008f00c705cd009a009a006f00cb00cd019e01d300f000ba018300d50098 -03040248009e01d500c100cb00f600830354027f00000333026600d300c700a400cd008f009a -0073040005d5010a00fe022b00a400b4009c00000062009c0000001d032d05d505d505d505f0 -007f007b005400a406b80614072301d300b800cb00a601c301ec069300a000d3035c037103db -0185042304a80448008f0139011401390360008f05d5019a0614072306660179046004600460 -047b009c00000277046001aa00e904600762007b00c5007f027b000000b4025205cd006600bc -00660077061000cd013b01850389008f007b0000001d00cd074a042f009c009c0000077d006f -0000006f0335006a006f007b00ae00b2002d0396008f027b00f600830354063705f6008f009c -04e10266008f018d02f600cd03440029006604ee00730000140000960000b707060504030201 -002c2010b002254964b040515820c859212d2cb002254964b040515820c859212d2c20100720 -b00050b00d7920b8ffff5058041b0559b0051cb0032508b0042523e120b00050b00d7920b8ff -ff5058041b0559b0051cb0032508e12d2c4b505820b0fd454459212d2cb002254560442d2c4b -5358b00225b0022545445921212d2c45442d2cb00225b0022549b00525b005254960b0206368 -208a108a233a8a10653a2d000001000000025eb830e212445f0f3cf5001f080000000000d3d9 -0a2c00000000d3d90a2cf7d6fc4c0e5909dc00000008000000010000000000010000076dfe1d -00000efef7d6fa510e5900010000000000000000000000000000001f04cd006604d300c9034a -00ba04e500710239ffdb04ec007104a200ba03230037051200ba04e7007b051200ba042b006f -028b000005db00b207cb00ba02d1002f023900c10514007105790010051200ae025c00c907e9 -0044051400ba051400ba0579001005140071023900c105fc00c904660071043300580000fcd7 -0000000000000044000000c400000134000001d8000002540000032800000418000004940000 -050c00000638000006b000000810000008100000089400000958000009f000000a2c00000ac4 -00000af400000b7800000bc000000d7c00000e1400000eb400000fb000001078000010c80000 -117000001208000012d4000013a000010000001f0354002b0068000c00020010009900080000 -0415021600080004b8028040fffbfe03fa1403f92503f83203f79603f60e03f5fe03f4fe03f3 -2503f20e03f19603f02503ef8a4105effe03ee9603ed9603ecfa03ebfa03eafe03e93a03e842 -03e7fe03e63203e5e45305e59603e48a4105e45303e3e22f05e3fa03e22f03e1fe03e0fe03df -3203de1403dd9603dcfe03db1203da7d03d9bb03d8fe03d68a4105d67d03d5d44705d57d03d4 -4703d3d21b05d3fe03d21b03d1fe03d0fe03cffe03cefe03cd9603cccb1e05ccfe03cb1e03ca -3203c9fe03c6851105c61c03c51603c4fe03c3fe03c2fe03c1fe03c0fe03bffe03befe03bdfe -03bcfe03bbfe03ba1103b9862505b9fe03b8b7bb05b8fe03b7b65d05b7bb03b78004b6b52505 -b65d40ff03b64004b52503b4fe03b39603b2fe03b1fe03b0fe03affe03ae6403ad0e03acab25 -05ac6403abaa1205ab2503aa1203a98a4105a9fa03a8fe03a7fe03a6fe03a51203a4fe03a3a2 -0e05a33203a20e03a16403a08a4105a096039ffe039e9d0c059efe039d0c039c9b19059c6403 -9b9a10059b19039a1003990a0398fe0397960d0597fe03960d03958a410595960394930e0594 -2803930e0392fa039190bb0591fe03908f5d0590bb039080048f8e25058f5d038f40048e2503 -8dfe038c8b2e058cfe038b2e038a8625058a410389880b05891403880b038786250587640386 -85110586250385110384fe038382110583fe0382110381fe0380fe037ffe0340ff7e7d7d057e -fe037d7d037c64037b5415057b25037afe0379fe03780e03770c03760a0375fe0374fa0373fa -0372fa0371fa0370fe036ffe036efe036c21036bfe036a1142056a530369fe03687d03671142 -0566fe0365fe0364fe0363fe0362fe03613a0360fa035e0c035dfe035bfe035afe0359580a05 -59fa03580a035716190557320356fe035554150555420354150353011005531803521403514a -130551fe03500b034ffe034e4d10054efe034d10034cfe034b4a13054bfe034a4910054a1303 -491d0d05491003480d0347fe0346960345960344fe0343022d0543fa0342bb03414b0340fe03 -3ffe033e3d12053e14033d3c0f053d12033c3b0d053c40ff0f033b0d033afe0339fe03383714 -0538fa033736100537140336350b05361003350b03341e03330d0332310b0532fe03310b0330 -2f0b05300d032f0b032e2d09052e10032d09032c32032b2a25052b64032a2912052a25032912 -032827250528410327250326250b05260f03250b0324fe0323fe03220f032101100521120320 -64031ffa031e1d0d051e64031d0d031c1142051cfe031bfa031a42031911420519fe03186403 -1716190517fe031601100516190315fe0314fe0313fe031211420512fe0311022d0511420310 -7d030f64030efe030d0c16050dfe030c0110050c16030bfe030a100309fe0308022d0508fe03 -0714030664030401100504fe03401503022d0503fe0302011005022d0301100300fe0301b801 -64858d012b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +00c100000179061400030007002b400e06be04b100bc020501080400460810fc3cec3231002f +e4fcec30400b1009400950096009700905015d1333112311331523c1b8b8b8b80460fba00614 +e900000100c90000061f05d5000c00bf403403110708070211010208080702110302090a0901 +110a0a09420a070203080300af080b050908030201050a061c043e0a1c00040d10fcecfcec11 +173931002f3cc4ec32111739304b5358071005ed071008ed071008ed071005ed5922b2700e01 +015d405603070f080f09020a15021407130a260226072007260a200a3407350a69027c027b07 +790a80028207820a90021604010b0313011b0323012c032708280934013c035608590965086a +097608790981018d0395019b03145d005d13210901211123110123011123c9012d017d017f01 +2dc5fe7fcbfe7fc405d5fc0803f8fa2b051ffc000400fae10000000100c90000046a05d50005 +0025400c0295008104011c033a00040610fcecec31002fe4ec30400930075007800380040401 +5d133311211521c9ca02d7fc5f05d5fad5aa000200100000056805d50002000a00c240410011 +0100040504021105050401110a030a0011020003030a0711050406110505040911030a08110a +030a4200030795010381090509080706040302010009050a0b10d4c4173931002f3ce4d4ec12 +39304b5358071005ed0705ed071005ed0705ed071008ed071005ed071005ed071008ed5922b2 +200c01015d40420f010f020f070f080f005800760070008c0009070108020603090416011902 +56015802500c67016802780176027c0372047707780887018802800c980299039604175d005d +090121013301230321032302bcfeee0225fe7be50239d288fd5f88d5050efd1903aefa2b017f +fe810000000100c90000053305d500090079401e071101020102110607064207020300af0805 +060107021c0436071c00040a10fcecfcec11393931002f3cec323939304b5358071004ed0710 +04ed5922b21f0b01015d40303602380748024707690266078002070601090615011a06460149 +065701580665016906790685018a0695019a069f0b105d005d13210111331121011123c90110 +0296c4fef0fd6ac405d5fb1f04e1fa2b04e1fb1f0002fcd7050eff2905d90003000700a5400d +0400ce0602080164000564040810d4fcdcec310010d43cec3230004bb00e544bb011545b58bd +00080040000100080008ffc03811373859014bb00e544bb00d545b4bb017545b58bd0008ffc0 +00010008000800403811373859014bb011544bb019545b58bd00080040000100080008ffc038 +11373859004bb0185458bd0008ffc00001000800080040381137385940116001600260056006 +700170027005700608015d0133152325331523fe5ecbcbfe79cbcb05d9cbcbcb0000013500b8 +00cb00cb00c100aa009c01a600b800660000007100cb00a002b20085007500b800c301cb0189 +022d00cb00a600f000d300aa008700cb03aa0400014a003300cb000000d9050200f4015400b4 +009c01390114013907060400044e04b4045204b804e704cd0037047304cd04600473013303a2 +055605a60556053903c5021200c9001f00b801df007300ba03e9033303bc0444040e00df03cd +03aa00e503aa0404000000cb008f00a4007b00b80014016f007f027b0252008f00c705cd009a +009a006f00cb00cd019e01d300f000ba018300d5009803040248009e01d500c100cb00f60083 +0354027f00000333026600d300c700a400cd008f009a0073040005d5010a00fe022b00a400b4 +009c00000062009c0000001d032d05d505d505d505f0007f007b005400a406b80614072301d3 +00b800cb00a601c301ec069300a000d3035c037103db0185042304a80448008f013901140139 +0360008f05d5019a0614072306660179046004600460047b009c00000277046001aa00e90460 +0762007b00c5007f027b000000b4025205cd006600bc00660077061000cd013b01850389008f +007b0000001d00cd074a042f009c009c0000077d006f0000006f0335006a006f007b00ae00b2 +002d0396008f027b00f600830354063705f6008f009c04e10266008f018d02f600cd03440029 +006604ee00730000140000960000b707060504030201002c2010b002254964b040515820c859 +212d2cb002254964b040515820c859212d2c20100720b00050b00d7920b8ffff5058041b0559 +b0051cb0032508b0042523e120b00050b00d7920b8ffff5058041b0559b0051cb0032508e12d +2c4b505820b0fd454459212d2cb002254560442d2c4b5358b00225b0022545445921212d2c45 +442d2cb00225b0022549b00525b005254960b0206368208a108a233a8a10653a2d0000010000 +00025eb80a4d73005f0f3cf5001f080000000000d3d94ef700000000d3d94ef7f7d6fc4c0e59 +09dc00000008000000010000000000010000076dfe1d00000efef7d6fa510e59000100000000 +00000000000000000000002204cd006604d300c9034a00ba04e500710239ffdb04ec007104a2 +00ba03230037051200ba04e7007b051200ba042b006f028b000005db00b207cb00ba02d1002f +023900c10514007105790010051200ae025c00c907e90044051400ba051400ba050e00c90514 +0071057d00c904330058023900c106e700c9047500c90579001005fc00c90000fcd700000000 +00000044000000c400000134000001d8000002540000032800000418000004940000050c0000 +0638000006b000000810000008100000089400000958000009f000000a2c00000ac400000af4 +00000b7800000bc000000d7c00000e1400000eb400000f1400000fdc0000108c000011580000 +11a8000012a4000012e8000013e40000148c000015580001000000220354002b0068000c0002 +00100099000800000415021600080004b8028040fffbfe03fa1403f92503f83203f79603f60e +03f5fe03f4fe03f32503f20e03f19603f02503ef8a4105effe03ee9603ed9603ecfa03ebfa03 +eafe03e93a03e84203e7fe03e63203e5e45305e59603e48a4105e45303e3e22f05e3fa03e22f +03e1fe03e0fe03df3203de1403dd9603dcfe03db1203da7d03d9bb03d8fe03d68a4105d67d03 +d5d44705d57d03d44703d3d21b05d3fe03d21b03d1fe03d0fe03cffe03cefe03cd9603cccb1e +05ccfe03cb1e03ca3203c9fe03c6851105c61c03c51603c4fe03c3fe03c2fe03c1fe03c0fe03 +bffe03befe03bdfe03bcfe03bbfe03ba1103b9862505b9fe03b8b7bb05b8fe03b7b65d05b7bb +03b78004b6b52505b65d40ff03b64004b52503b4fe03b39603b2fe03b1fe03b0fe03affe03ae +6403ad0e03acab2505ac6403abaa1205ab2503aa1203a98a4105a9fa03a8fe03a7fe03a6fe03 +a51203a4fe03a3a20e05a33203a20e03a16403a08a4105a096039ffe039e9d0c059efe039d0c +039c9b19059c64039b9a10059b19039a1003990a0398fe0397960d0597fe03960d03958a4105 +95960394930e05942803930e0392fa039190bb0591fe03908f5d0590bb039080048f8e25058f +5d038f40048e25038dfe038c8b2e058cfe038b2e038a8625058a410389880b05891403880b03 +878625058764038685110586250385110384fe038382110583fe0382110381fe0380fe037ffe +0340ff7e7d7d057efe037d7d037c64037b5415057b25037afe0379fe03780e03770c03760a03 +75fe0374fa0373fa0372fa0371fa0370fe036ffe036efe036c21036bfe036a1142056a530369 +fe03687d036711420566fe0365fe0364fe0363fe0362fe03613a0360fa035e0c035dfe035bfe +035afe0359580a0559fa03580a035716190557320356fe035554150555420354150353011005 +531803521403514a130551fe03500b034ffe034e4d10054efe034d10034cfe034b4a13054bfe +034a4910054a1303491d0d05491003480d0347fe0346960345960344fe0343022d0543fa0342 +bb03414b0340fe033ffe033e3d12053e14033d3c0f053d12033c3b0d053c40ff0f033b0d033a +fe0339fe033837140538fa033736100537140336350b05361003350b03341e03330d0332310b +0532fe03310b03302f0b05300d032f0b032e2d09052e10032d09032c32032b2a25052b64032a +2912052a25032912032827250528410327250326250b05260f03250b0324fe0323fe03220f03 +210110052112032064031ffa031e1d0d051e64031d0d031c1142051cfe031bfa031a42031911 +420519fe031864031716190517fe031601100516190315fe0314fe0313fe031211420512fe03 +11022d05114203107d030f64030efe030d0c16050dfe030c0110050c16030bfe030a100309fe +0308022d0508fe030714030664030401100504fe03401503022d0503fe0302011005022d0301 +100300fe0301b80164858d012b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b -2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b002b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b002b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b -2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b1d00> +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b1d00> ] def /f-0-0 currentdict end definefont pop %%EndResource %%EndSetup %%Page: 1 1 %%BeginPageSetup -%%PageBoundingBox: 0 0 397 397 +%%PageBoundingBox: 0 -1 397 439 %%EndPageSetup -q 0 0 397 397 rectclip -1 0 0 -1 0 397 cm q +q 0 -1 397 440 rectclip q 0.164706 0.498039 1 rg -396.988 198.496 m 396.988 308.121 308.121 396.988 198.496 396.988 c 88.871 - 396.988 0 308.121 0 198.496 c 0 88.871 88.871 0 198.496 0 c 308.121 0 396.988 - 88.871 396.988 198.496 c h -396.988 198.496 m f -358.414 197.754 m 358.414 286.5 286.469 358.445 197.723 358.445 c 108.973 - 358.445 37.031 286.5 37.031 197.754 c 37.031 109.004 108.973 37.062 197.723 - 37.062 c 286.469 37.062 358.414 109.004 358.414 197.754 c h -358.414 197.754 m f +396.988 239.776 m 396.988 130.151 308.121 41.284 198.496 41.284 c 88.871 + 41.284 0 130.151 0 239.776 c 0 349.401 88.871 438.272 198.496 438.272 c + 308.121 438.272 396.988 349.401 396.988 239.776 c h +396.988 239.776 m f +358.414 240.518 m 358.414 151.772 286.469 79.827 197.723 79.827 c 108.973 + 79.827 37.031 151.772 37.031 240.518 c 37.031 329.268 108.973 401.213 197.723 + 401.213 c 286.469 401.213 358.414 329.268 358.414 240.518 c h +358.414 240.518 m f 1 g 2.834646 w 0 J 0 j [] 0.0 d -4 M q 1 0 0 1 0 0 cm +4 M q 1 0 0 -1 0 438.271881 cm 358.414 197.754 m 358.414 286.5 286.469 358.445 197.723 358.445 c 108.973 - 358.445 37.031 286.5 37.031 197.754 c 37.031 109.004 108.973 37.062 197.723 - 37.062 c 286.469 37.062 358.414 109.004 358.414 197.754 c h + 358.445 37.031 286.5 37.031 197.754 c 37.031 109.004 108.973 37.059 197.723 + 37.059 c 286.469 37.059 358.414 109.004 358.414 197.754 c h 358.414 197.754 m S Q 0.164706 0.498039 1 rg -313.051 194.723 m 313.051 258.418 261.418 310.051 197.723 310.051 c 134.027 - 310.051 82.395 258.418 82.395 194.723 c 82.395 131.027 134.027 79.395 197.723 - 79.395 c 261.418 79.395 313.051 131.027 313.051 194.723 c h -313.051 194.723 m f +313.051 243.549 m 313.051 179.854 261.418 128.221 197.723 128.221 c 134.027 + 128.221 82.395 179.854 82.395 243.549 c 82.395 307.245 134.027 358.877 +197.723 358.877 c 261.418 358.877 313.051 307.245 313.051 243.549 c h +313.051 243.549 m f 1 g -q 1 0 0 1 0 0 cm +q 1 0 0 -1 0 438.271881 cm 313.051 194.723 m 313.051 258.418 261.418 310.051 197.723 310.051 c 134.027 310.051 82.395 258.418 82.395 194.723 c 82.395 131.027 134.027 79.395 197.723 79.395 c 261.418 79.395 313.051 131.027 313.051 194.723 c h 313.051 194.723 m S Q 0.164706 0.498039 1 rg -262.012 196.238 m 262.012 233.418 231.871 263.555 194.691 263.555 c 157.512 - 263.555 127.375 233.418 127.375 196.238 c 127.375 159.059 157.512 128.918 - 194.691 128.918 c 231.871 128.918 262.012 159.059 262.012 196.238 c h -262.012 196.238 m f +262.012 242.034 m 262.012 204.854 231.871 174.717 194.691 174.717 c 157.512 + 174.717 127.371 204.854 127.371 242.034 c 127.371 279.213 157.512 309.354 + 194.691 309.354 c 231.871 309.354 262.012 279.213 262.012 242.034 c h +262.012 242.034 m f 1 g -q 1 0 0 1 0 0 cm +q 1 0 0 -1 0 438.271881 cm 262.012 196.238 m 262.012 233.418 231.871 263.555 194.691 263.555 c 157.512 - 263.555 127.375 233.418 127.375 196.238 c 127.375 159.059 157.512 128.918 + 263.555 127.371 233.418 127.371 196.238 c 127.371 159.059 157.512 128.918 194.691 128.918 c 231.871 128.918 262.012 159.059 262.012 196.238 c h 262.012 196.238 m S Q 0 g BT -14.343145 0 0 -14.343145 125.543065 29.692097 Tm +14.343145 0 0 14.343145 125.54302 408.579891 Tm /f-0-0 1 Tf [(P)17(r)21(ojektnah)-3(es Umfeld)]TJ -16.134054 0 0 -16.134054 129.377726 72.654728 Tm +16.134054 0 0 16.134054 129.377681 365.617271 Tm [(\304usser)19(es Umfeld)]TJ -16.848129 0 0 -16.848129 134.352349 119.991464 Tm +16.848129 0 0 16.848129 134.352303 318.280535 Tm [(Inner)19(es Umfeld)]TJ -20.589591 0 0 -20.589591 149.046844 202.362129 Tm +20.589591 0 0 20.589591 149.046798 235.909853 Tm [(W)59(ebshop)]TJ ET 0.501961 0.701961 1 rg -128.988 175.957 m 173.691 182.801 173.691 182.801 173.691 182.801 c f +128.988 262.315 m 173.691 255.471 173.691 255.471 173.691 255.471 c f 1.206188 w -q 1 0 0 1 0 0 cm +q 1 0 0 -1 0 438.271881 cm 128.988 175.957 m 173.691 182.801 173.691 182.801 173.691 182.801 c S Q -133.758 176.688 m 136.508 174.668 l 127.797 175.773 l 135.777 179.438 l +133.758 261.584 m 136.508 263.604 l 127.797 262.498 l 135.777 258.834 l h -133.758 176.688 m f* +133.758 261.584 m f* 0.635892 w -q 1 0.153091 -0.153091 1 0 0 cm -157.125 152.633 m 159.51 150.248 l 151.163 152.632 l 159.509 155.018 l -h +q 1 -0.153091 -0.153091 -1 0 438.271881 cm +157.125 152.633 m 159.509 150.249 l 151.163 152.632 l 159.509 155.018 l + h 157.125 152.633 m S Q -168.922 182.07 m 166.172 184.09 l 174.883 182.98 l 166.902 179.32 l h -168.922 182.07 m f* -q -1 -0.153091 0.153091 -1 0 0 cm +168.922 256.202 m 166.172 254.182 l 174.883 255.291 l 166.902 258.952 l + h +168.922 256.202 m f* +q -1 0.153091 0.153091 1 0 438.271881 cm -192.289 -152.633 m -189.904 -155.017 l -198.249 -152.63 l -189.904 -150.248 l h -192.289 -152.633 m S Q -201.043 186.133 m 243.746 170.746 243.746 170.746 243.746 170.746 c f +201.043 252.139 m 243.746 267.526 243.746 267.526 243.746 267.526 c f 1.417323 w -q 1 0 0 1 0 0 cm +q 1 0 0 -1 0 438.271881 cm 201.043 186.133 m 243.746 170.746 243.746 170.746 243.746 170.746 c S Q -206.375 184.211 m 208.082 180.586 l 199.711 186.613 l 210.004 185.918 l - h -206.375 184.211 m f* -0.711155 w -q 1 -0.360295 0.360295 1 0 0 cm -123.919 228.858 m 126.586 226.194 l 117.254 228.859 l 126.586 231.526 l - h +206.375 254.061 m 208.082 257.69 l 199.711 251.659 l 210.004 252.354 l +h +206.375 254.061 m f* +0.711156 w +q 1 0.360293 0.360293 -1 0 438.271881 cm +123.919 228.858 m 126.587 226.19 l 117.255 228.859 l 126.587 231.526 l +h 123.919 228.858 m S Q -238.414 172.668 m 236.707 176.297 l 245.082 170.266 l 234.785 170.965 l +238.414 265.604 m 236.707 261.975 l 245.082 268.006 l 234.785 267.307 l h -238.414 172.668 m f* -q -1 0.360295 -0.360295 -1 0 0 cm --155.958 -228.859 m -153.289 -231.526 l -162.625 -228.859 l -153.289 -226.194 +238.414 265.604 m f* +q -1 -0.360293 -0.360293 1 0 438.271881 cm +-155.958 -228.858 m -153.29 -231.526 l -162.626 -228.859 l -153.289 -226.194 l h --155.958 -228.859 m S Q +-155.958 -228.858 m S Q 1 0 0 rg -164.285 269.652 m 183.539 209.906 183.539 209.906 183.539 209.906 c f +164.285 168.62 m 183.539 228.366 183.539 228.366 183.539 228.366 c f 0 g 1.417323 w -q 1 0 0 1 0 0 cm +q 1 0 0 -1 0 438.271881 cm 164.285 269.652 m 183.539 209.906 183.539 209.906 183.539 209.906 c S Q -166.023 264.254 m 164.195 260.688 l 163.852 271 l 169.594 262.426 l h -166.023 264.254 m f* -0.719466 w -q 0.322274 -1 1 0.322274 0 0 cm --190.92 227.552 m -188.223 224.855 l -197.665 227.554 l -188.221 230.253 - l h --190.92 227.552 m S Q -181.801 215.305 m 183.629 218.871 l 183.977 208.559 l 178.234 217.133 l +166.023 174.018 m 164.195 177.584 l 163.852 167.272 l 169.594 175.846 l h -181.801 215.305 m f* -q -0.322274 1 -1 -0.322274 0 0 cm -141.97 -227.554 m 144.667 -230.251 l 135.223 -227.556 l 144.667 -224.857 +166.023 174.018 m f* +0.719466 w +q 0.322276 1 1 -0.322276 0 438.271881 cm +-190.919 227.552 m -188.222 224.855 l -197.665 227.554 l -188.221 230.253 l h -141.97 -227.554 m S Q +-190.919 227.552 m S Q +181.801 222.967 m 183.629 219.401 l 183.977 229.713 l 178.234 221.139 l + h +181.801 222.967 m f* +q -0.322276 -1 -1 0.322276 0 438.271881 cm +141.969 -227.554 m 144.666 -230.251 l 135.223 -227.556 l 144.667 -224.857 + l h +141.969 -227.554 m S Q 1 0 0 rg -220.348 208.148 m 284.445 291.23 284.445 291.23 284.445 291.23 c f +220.348 230.123 m 284.445 147.041 284.445 147.041 284.445 147.041 c f 1.417323 w [ 5.669291 1.417323] 0 d -q 1 0 0 1 0 0 cm +q 1 0 0 -1 0 438.271881 cm 220.348 208.148 m 284.445 291.23 284.445 291.23 284.445 291.23 c S Q -223.809 212.637 m 227.785 213.152 l 219.48 207.027 l 223.297 216.613 l -h -223.809 212.637 m f* -0.598486 w +223.809 225.635 m 227.785 225.12 l 219.48 231.245 l 223.297 221.659 l h +223.809 225.635 m f* +0.598485 w [] 0.0 d -q 0.771519 1 -1 0.771519 0 0 cm -241.537 -37.458 m 243.783 -39.702 l 235.927 -37.458 l 243.782 -35.214 l +q 0.771524 -1 -1 -0.771524 0 438.271881 cm +241.536 -37.458 m 243.783 -39.701 l 235.927 -37.457 l 243.781 -35.214 l h -241.537 -37.458 m S Q -280.98 286.742 m 277.004 286.23 l 285.309 292.352 l 281.492 282.766 l h -280.98 286.742 m f* -q -0.771519 -1 1 -0.771519 0 0 cm --315.641 37.457 m -313.397 35.212 l -321.251 37.458 l -313.396 39.701 l - h --315.641 37.457 m S Q +241.536 -37.458 m S Q +280.98 151.53 m 277.004 152.045 l 285.309 145.92 l 281.492 155.506 l h +280.98 151.53 m f* +q -0.771524 1 1 0.771524 0 438.271881 cm +-315.641 37.456 m -313.394 35.213 l -321.25 37.456 l -313.395 39.7 l h +-315.641 37.456 m S Q +1 0.0235294 0.0235294 rg +13.762 6.877 m 53.605 6.592 53.605 6.592 53.605 6.592 c f +1 0 0 rg +1.044071 w +[ 4.176283 1.044071] 0 d +q 1 0 0 -1 0 438.271881 cm +13.762 431.395 m 53.605 431.68 53.605 431.68 53.605 431.68 c S Q +17.938 6.846 m 20.039 8.92 l 12.715 6.885 l 20.008 4.745 l h +17.938 6.846 m f* +0.556824 w +[] 0.0 d +q 1 -0.00713171 -0.00713171 -1 0 438.271881 cm +21.013 431.276 m 23.1 429.187 l 15.791 431.274 l 23.098 433.363 l h +21.013 431.276 m S Q +49.43 6.623 m 47.328 4.549 l 54.652 6.584 l 47.355 8.725 l h +49.43 6.623 m f* +q -1 0.00713171 0.00713171 1 0 438.271881 cm +-52.505 -431.274 m -50.419 -433.363 l -57.728 -431.276 l -50.416 -429.187 + l h +-52.505 -431.274 m S Q +54.281 18.541 m 13.637 19.018 13.637 19.018 13.637 19.018 c f +0 g +1.32878 w +q 1 0 0 -1 0 438.271881 cm +54.281 419.73 m 13.637 419.254 13.637 419.254 13.637 419.254 c S Q +48.965 18.604 m 46.277 15.979 l 55.609 18.526 l 46.34 21.291 l h +48.965 18.604 m f* +0.708635 w +q -1 0.0116506 0.0116506 1 0 438.271881 cm +-53.847 -419.041 m -51.19 -421.697 l -60.491 -419.041 l -51.191 -416.384 + l h +-53.847 -419.041 m S Q +18.949 18.955 m 21.637 21.58 l 12.305 19.034 l 21.578 16.264 l h +18.949 18.955 m f* +q 1 -0.0116506 -0.0116506 -1 0 438.271881 cm +23.831 419.039 m 26.488 416.383 l 17.187 419.038 l 26.491 421.699 l h +23.831 419.039 m S Q +0.501961 0.701961 1 rg +13.617 30.889 m 54.203 30.623 54.203 30.623 54.203 30.623 c f +1.397034 w +q 1 0 0 -1 0 438.271881 cm +13.617 407.383 m 54.203 407.648 54.203 407.648 54.203 407.648 c S Q +19.207 30.854 m 22.02 33.631 l 12.223 30.901 l 21.98 28.041 l h +19.207 30.854 m f* +0.745069 w +q 1 -0.00660047 -0.00660047 -1 0 438.271881 cm +21.895 407.273 m 24.689 404.478 l 14.911 407.273 l 24.687 410.068 l h +21.895 407.273 m S Q +48.613 30.659 m 45.801 27.885 l 55.598 30.612 l 45.84 33.471 l h +48.613 30.659 m f* +q -1 0.00660047 0.00660047 1 0 438.271881 cm +-51.301 -407.275 m -48.507 -410.067 l -58.286 -407.275 l -48.51 -404.481 + l h +-51.301 -407.275 m S Q +0 g +BT +11.999999 0 0 11.999999 59.999949 26.817564 Tm +/f-0-0 1 Tf +[(Enge Bezieh)-3(ung)]TJ +0.00222935 -1.07191 Td +[(Mittler)20(e Beziehun)-3(g)]TJ +-0.0111611 -0.954878 Td +[(L)18(ose Beziehun)-3(g)]TJ +ET 0.164706 0.498039 1 rg -140.199 197.223 m 140.199 213.496 117.652 226.688 89.84 226.688 c 62.031 - 226.688 39.484 213.496 39.484 197.223 c 39.484 180.949 62.031 167.758 89.84 - 167.758 c 117.652 167.758 140.199 180.949 140.199 197.223 c h -140.199 197.223 m f +140.199 241.049 m 140.199 224.78 117.652 211.588 89.84 211.588 c 62.031 + 211.588 39.484 224.78 39.484 241.049 c 39.484 257.323 62.031 270.514 89.84 + 270.514 c 117.652 270.514 140.199 257.323 140.199 241.049 c h +140.199 241.049 m f 0 g 0.566929 w -q 1 0 0 1 0 0 cm -140.199 197.223 m 140.199 213.496 117.652 226.688 89.84 226.688 c 62.031 - 226.688 39.484 213.496 39.484 197.223 c 39.484 180.949 62.031 167.758 89.84 +q 1 0 0 -1 0 438.271881 cm +140.199 197.223 m 140.199 213.492 117.652 226.684 89.84 226.684 c 62.031 + 226.684 39.484 213.492 39.484 197.223 c 39.484 180.949 62.031 167.758 89.84 167.758 c 117.652 167.758 140.199 180.949 140.199 197.223 c h 140.199 197.223 m S Q 1 g BT -12.976208 0 0 -12.976208 47.009903 200.35926 Tm +12.976208 0 0 12.976208 47.009858 237.913483 Tm /f-0-0 1 Tf [(Auf)18(traggeber)]TJ ET 0.164706 0.498039 1 rg -337.348 172.562 m 337.348 187.949 316.961 200.418 291.812 200.418 c 266.664 - 200.418 246.273 187.949 246.273 172.562 c 246.273 157.176 266.664 144.707 - 291.812 144.707 c 316.961 144.707 337.348 157.176 337.348 172.562 c h -337.348 172.562 m f +337.348 265.709 m 337.348 250.327 316.961 237.854 291.812 237.854 c 266.664 + 237.854 246.273 250.327 246.273 265.709 c 246.273 281.096 266.664 293.569 + 291.812 293.569 c 316.961 293.569 337.348 281.096 337.348 265.709 c h +337.348 265.709 m f 0 g -q 1 0 0 1 0 0 cm -337.348 172.562 m 337.348 187.949 316.961 200.418 291.812 200.418 c 266.664 - 200.418 246.273 187.949 246.273 172.562 c 246.273 157.176 266.664 144.707 - 291.812 144.707 c 316.961 144.707 337.348 157.176 337.348 172.562 c h +q 1 0 0 -1 0 438.271881 cm +337.348 172.562 m 337.348 187.945 316.961 200.418 291.812 200.418 c 266.664 + 200.418 246.273 187.945 246.273 172.562 c 246.273 157.176 266.664 144.703 + 291.812 144.703 c 316.961 144.703 337.348 157.176 337.348 172.562 c h 337.348 172.562 m S Q 1 g BT -13.393396 0 0 -13.393396 251.119244 176.981335 Tm +13.393396 0 0 13.393396 251.119198 261.291261 Tm /f-0-0 1 Tf [(P)17(r)21(ojektleiter)]TJ ET 0.164706 0.498039 1 rg -385.621 312.117 m 385.621 327.203 360.199 339.438 328.836 339.438 c 297.473 - 339.438 272.051 327.203 272.051 312.117 c 272.051 297.027 297.473 284.793 - 328.836 284.793 c 360.199 284.793 385.621 297.027 385.621 312.117 c h -385.621 312.117 m f +377.383 120.264 m 377.383 105.178 350.926 92.948 318.293 92.948 c 285.656 + 92.948 259.199 105.178 259.199 120.264 c 259.199 135.35 285.656 147.58 +318.293 147.58 c 350.926 147.58 377.383 135.35 377.383 120.264 c h +377.383 120.264 m f 0 g -q 1 0 0 1 0 0 cm -385.621 312.117 m 385.621 327.203 360.199 339.438 328.836 339.438 c 297.473 - 339.438 272.051 327.203 272.051 312.117 c 272.051 297.027 297.473 284.793 - 328.836 284.793 c 360.199 284.793 385.621 297.027 385.621 312.117 c h -385.621 312.117 m S Q +0.589953 w +q 1 0 0 -0.960832 0 438.271881 cm +377.383 330.971 m 377.383 346.672 350.926 359.401 318.293 359.401 c 285.656 + 359.401 259.199 346.672 259.199 330.971 c 259.199 315.27 285.656 302.541 + 318.293 302.541 c 350.926 302.541 377.383 315.27 377.383 330.971 c h +377.383 330.971 m S Q 1 g BT -15.280759 0 0 -15.280759 286.887182 317.217955 Tm +15.901341 0 0 15.278521 264.997098 115.162451 Tm /f-0-0 1 Tf -[(Nachfr)-3(ager)]TJ +[(Inter)19(essenten)]TJ ET 0.164706 0.498039 1 rg -192.418 295.68 m 192.418 309.289 172.75 320.32 148.488 320.32 c 124.227 - 320.32 104.559 309.289 104.559 295.68 c 104.559 282.07 124.227 271.035 -148.488 271.035 c 172.75 271.035 192.418 282.07 192.418 295.68 c h -192.418 295.68 m f +192.414 142.592 m 192.414 128.983 172.75 117.952 148.488 117.952 c 124.227 + 117.952 104.559 128.983 104.559 142.592 c 104.559 156.205 124.227 167.237 + 148.488 167.237 c 172.75 167.237 192.414 156.205 192.414 142.592 c h +192.414 142.592 m f 0 g -q 1 0 0 1 0 0 cm -192.418 295.68 m 192.418 309.289 172.75 320.32 148.488 320.32 c 124.227 - 320.32 104.559 309.289 104.559 295.68 c 104.559 282.07 124.227 271.035 -148.488 271.035 c 172.75 271.035 192.418 282.07 192.418 295.68 c h -192.418 295.68 m S Q +0.566929 w +q 1 0 0 -1 0 438.271881 cm +192.414 295.68 m 192.414 309.289 172.75 320.32 148.488 320.32 c 124.227 + 320.32 104.559 309.289 104.559 295.68 c 104.559 282.066 124.227 271.035 + 148.488 271.035 c 172.75 271.035 192.414 282.066 192.414 295.68 c h +192.414 295.68 m S Q 1 g BT -16.303735 0 0 -16.303735 120.260266 300.801434 Tm +16.303735 0 0 16.303735 120.260221 137.471357 Tm /f-0-0 1 Tf [(Nutzer)]TJ ET diff --git a/docs/diagrammes/stakeholder_diagramm.svg b/docs/diagrammes/stakeholder_diagramm.svg index eaf06f1..d59562a 100644 --- a/docs/diagrammes/stakeholder_diagramm.svg +++ b/docs/diagrammes/stakeholder_diagramm.svg @@ -10,8 +10,8 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="140.04924mm" - height="140.04924mm" - viewBox="0 0 140.04924 140.04924" + height="154.61258mm" + viewBox="0 0 140.04924 154.61258" version="1.1" id="svg8" inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" @@ -172,6 +172,98 @@ transform="matrix(0.8,0,0,0.8,10,0)" inkscape:connector-curvature="0" /> + + + + + + + + + + + + + + + + + + + transform="translate(-33.141434,96.338833)" + sodipodi:insensitive="true"> + transform="translate(-33.141434,96.338833)" + sodipodi:insensitive="true"> Projektnahes Umfeld Äusseres Umfeld Inneres Umfeld Webshop + transform="translate(-33.141434,96.338833)" + sodipodi:insensitive="true"> + + + + Enge Beziehung + Mittlere Beziehung + Lose Beziehung + transform="translate(-33.141434,96.338833)"> + transform="translate(20.045215,-146.11482)"> + transform="translate(-17.372519,-139.16576)"> + transform="matrix(1.040612,0,0,0.9998535,-21.736032,-131.45262)"> Nachfrager + sodipodi:role="line">Interessenten + transform="translate(13.898015,-150.12388)"> Date: Wed, 3 Jan 2018 15:29:13 +0100 Subject: [PATCH 16/53] add the currencies app to the setup script --- ansible/roles/web_AI-5/tasks/setup_script.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/web_AI-5/tasks/setup_script.sh b/ansible/roles/web_AI-5/tasks/setup_script.sh index 6243fb4..1bcd57b 100755 --- a/ansible/roles/web_AI-5/tasks/setup_script.sh +++ b/ansible/roles/web_AI-5/tasks/setup_script.sh @@ -4,9 +4,11 @@ mysql < /vagrant/sql/01_create_database.sql #remove old migrations rm /vagrant/django/didgeridoo/webshop/migrations/*.py +rm /vagrant/django/didgeridoo/currencies/migrations/*.py #create and insert the new migrations python3 /vagrant/django/didgeridoo/manage.py makemigrations webshop +python3 /vagrant/django/didgeridoo/manage.py makemigrations currencies python3 /vagrant/django/didgeridoo/manage.py migrate #insert some default data into the database From b13a5defa14ba35cac4c1519d740b19543e9e2ac Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Wed, 3 Jan 2018 18:28:09 +0100 Subject: [PATCH 17/53] disable export of example data --- docs/doku.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/doku.org b/docs/doku.org index 41127b9..f0c5aa8 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -314,7 +314,7 @@ Am ende des Projekts die nicht lauffähigen teile ausgrenzen. :-) ** Umsetzung ** Gelerntes -* TODO samples [to be deleted] +* TODO samples [to be deleted] :noexport: *** Subsubsection - List From 31384afa4ac5f046650683c6e28af2ae038442cd Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Thu, 4 Jan 2018 11:59:57 +0100 Subject: [PATCH 18/53] extend the gitignore file the .listing files aren't required they get generated when converting the document to pdf. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2f3c6ba..d9a0721 100644 --- a/.gitignore +++ b/.gitignore @@ -266,3 +266,4 @@ fabric.properties # End of https://www.gitignore.io/api/pycharm /django/.idea/workspace.xml +/docs/main.listing From 42000eba16c560ed7906d96ee65c752c57d0ab66 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Thu, 4 Jan 2018 12:01:28 +0100 Subject: [PATCH 19/53] change the citation style to confirm with the IBZ guidlines --- docs/main.tex | 7 +++---- docs/style.tex | 6 +----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/main.tex b/docs/main.tex index fa3976b..a644d38 100644 --- a/docs/main.tex +++ b/docs/main.tex @@ -11,14 +11,13 @@ \microtypesetup{protrusion=true} % enables protrusion \newpage + \include{doku} \newpage - \nocite{*} - \bibliographystyle{acm} - \bibliography{bib} -\include{latex} +\printbibliography +\newpage \microtypesetup{protrusion=false} \listoffigures \microtypesetup{protrusion=true} diff --git a/docs/style.tex b/docs/style.tex index 780f3a6..d93f06d 100644 --- a/docs/style.tex +++ b/docs/style.tex @@ -125,9 +125,5 @@ title=\thetcbcounter #2, #1 } -%sort the bibliography by appearance -\usepackage[numbers,sort]{natbib} - -%Number Bibliography and include in ToC -\usepackage[nottoc]{tocbibind} +\usepackage[citestyle=verbose,bibstyle=numeric,sorting=none,backend=bibtex8]{biblatex} From 270e70d27d1e4f4c47647a46905d17ffdea6d982 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Thu, 4 Jan 2018 12:01:50 +0100 Subject: [PATCH 20/53] add a few general references --- docs/andreas_general.bib | 52 ++++++++++++++++++++++++++++++++++++++++ docs/main.tex | 1 + 2 files changed, 53 insertions(+) create mode 100644 docs/andreas_general.bib diff --git a/docs/andreas_general.bib b/docs/andreas_general.bib new file mode 100644 index 0000000..dbc8f80 --- /dev/null +++ b/docs/andreas_general.bib @@ -0,0 +1,52 @@ +@misc{git, + month = {{01}}, + note = {{\url{https://git-scm.com/}}}, + author = {Linus Torvalds}, + title = {{Git - Version Control System}}, + year = {2018}, +} + +@misc{ansible, + month = {{01}}, + note = {{\url{https://www.ansible.com/}}}, + Urldate = {{2018-01-03}}, + author = {Ansible, Red Hat}, + title = {{Ansible - IT Automation Software}}, + year = {2018}, +} + +@misc{vagrant, + month = {{01}}, + note = {{\url{https://www.ansible.com/}}}, + author = {HashiCorp, Inc.}, + title = {{Vagrant - Software Development Environment}}, + year = {2018}, +} + +@misc{latex, + month = {{01}}, + note = {{\url{https://www.latex-project.org/}}}, + Urldate = {{2018-01-03}}, + author = {Leslie Lamport}, + title = {{LaTeX - A document preparation system}}, + year = {2018}, +} + +@misc{debian, + month = {{01}}, + note = {{\url{https://www.debian.org/}}}, + Urldate = {{2018-01-03}}, + author = {Debian Project}, + title = {{Debian {--} The Universal Operating System}}, + year = {2018}, +} + +@misc{gplv3, + month = {{01}}, + note = {{\url{https://www.gnu.org/licenses/gpl-3.0.en.html}}}, + Urldate = {{2018-01-03}}, + author = {Free Software Foundation}, + title = {{GPLv3}}, + year = {2018}, +} + diff --git a/docs/main.tex b/docs/main.tex index a644d38..a42625f 100644 --- a/docs/main.tex +++ b/docs/main.tex @@ -1,5 +1,6 @@ \documentclass[a4paper, 11pt]{article} \include{style} +\bibliography{bib,andreas_general} %\include{glossary} \begin{document} From 9ef8a4371eeee4c9f3d6b3f008fc9af00bd333f3 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Thu, 4 Jan 2018 12:30:01 +0100 Subject: [PATCH 21/53] correct the datetimefield on the orders model In Django it's better to use timezone.now instead of datetime.now() this is because it has additional settings for timezones which this way wouldn't get reflected in the attributes and lead to wrong datetime values. --- django/didgeridoo/webshop/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/didgeridoo/webshop/models.py b/django/didgeridoo/webshop/models.py index ecb6678..3bb3442 100644 --- a/django/didgeridoo/webshop/models.py +++ b/django/didgeridoo/webshop/models.py @@ -2,7 +2,7 @@ from decimal import Decimal from django.core.validators import MinValueValidator from django.db import models from django.contrib.auth.models import User -import datetime +from django.utils import timezone class Option(models.Model): @@ -86,7 +86,7 @@ class Order(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) article = models.ManyToManyField(Article, through='OrderPosition') status = models.ForeignKey(OrderStatus) - date = models.DateTimeField(default=datetime.datetime.now()) + date = models.DateTimeField(default=timezone.now) class OrderPosition(models.Model): From 8ce6e303cff077da83ed3d28e6ffc50cd7d778de Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 00:56:04 +0100 Subject: [PATCH 22/53] add an abstract --- docs/main.tex | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/main.tex b/docs/main.tex index a42625f..c3bee01 100644 --- a/docs/main.tex +++ b/docs/main.tex @@ -6,6 +6,23 @@ \include{titlepage} +\newpage +\renewcommand{\abstractname}{Management Summary} +\begin{abstract} +Dies ist die Dokumentation für die zweite Case Study im Fach +Webtechnologien von Ivan Hörler und Andreas Zweili. Welche diese im +Rahmen ihres 5. Semesters an der IBZ Schule in Aarau erarbeiteten. Die +Case Study behandelt dabei das Erstellen eines Webshops und der dafür +gewählten Werkzeuge, die Projektplanung sowie die dabei aufgetretenen +Probleme. + +Zusätzlich sollen auch die Erfahrungen der Studenten im Zusammenhang +des verwendeten Frameworks Django aufgezeigt werden. Dieses ist nicht +Teil des Kurikulums weshalb diese Arbeit interessante zusätzliche +Möglichkeiten im Bereich der Entwicklung von Webapplikationen +aufzeigen kann. +\end{abstract} + \newpage \microtypesetup{protrusion=false} % disables protrusion locally in the document \tableofcontents % prints Table of Contents From ede806262fd32dd7c307475c31768de47cfcccc1 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 00:56:27 +0100 Subject: [PATCH 23/53] correct an author name in the references --- docs/andreas_general.bib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/andreas_general.bib b/docs/andreas_general.bib index dbc8f80..249d7da 100644 --- a/docs/andreas_general.bib +++ b/docs/andreas_general.bib @@ -18,7 +18,7 @@ @misc{vagrant, month = {{01}}, note = {{\url{https://www.ansible.com/}}}, - author = {HashiCorp, Inc.}, + author = {HashiCorp Inc.}, title = {{Vagrant - Software Development Environment}}, year = {2018}, } From f97499e2054d7486c1f1f4f4a4fecab1a71af070 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:00:51 +0100 Subject: [PATCH 24/53] enumerate everything down to subparagraphs --- docs/style.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/style.tex b/docs/style.tex index d93f06d..5fcf1fa 100644 --- a/docs/style.tex +++ b/docs/style.tex @@ -41,6 +41,9 @@ \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} +%number everything down to paragraphs +\setcounter{secnumdepth}{5} + %Enable Microtyping which improves justification \usepackage{microtype} From 06b8a9ac6ab2f2a5517a9d121687847ea7c083eb Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:01:18 +0100 Subject: [PATCH 25/53] start automatically a new page for each new section --- docs/style.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/style.tex b/docs/style.tex index 5fcf1fa..b98c621 100644 --- a/docs/style.tex +++ b/docs/style.tex @@ -59,6 +59,10 @@ \setlength{\skip\footins}{0.5cm} \usepackage[bottom,hang]{footmisc} +%each section should start on a new page +\usepackage{titlesec} +\newcommand{\sectionbreak}{\clearpage} + %European style paragraphs \setlength{\parskip}{\baselineskip}% \setlength{\parindent}{0pt}% From e3cc60ecd242c443b84ba4afb88683cc0b0fa816 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:01:41 +0100 Subject: [PATCH 26/53] add an additional bibliography file --- docs/main.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/main.tex b/docs/main.tex index c3bee01..e0ec4cc 100644 --- a/docs/main.tex +++ b/docs/main.tex @@ -1,6 +1,6 @@ \documentclass[a4paper, 11pt]{article} \include{style} -\bibliography{bib,andreas_general} +\bibliography{bib,andreas_general,andreas} %\include{glossary} \begin{document} From 5ffdd41ba1b9b7fa068b908b929781f57b2e9d9c Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:01:53 +0100 Subject: [PATCH 27/53] fix a Typo --- docs/main.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/main.tex b/docs/main.tex index e0ec4cc..0538a4c 100644 --- a/docs/main.tex +++ b/docs/main.tex @@ -12,7 +12,7 @@ Dies ist die Dokumentation für die zweite Case Study im Fach Webtechnologien von Ivan Hörler und Andreas Zweili. Welche diese im Rahmen ihres 5. Semesters an der IBZ Schule in Aarau erarbeiteten. Die -Case Study behandelt dabei das Erstellen eines Webshops und der dafür +Case Study behandelt dabei das Erstellen eines Web-Shops und der dafür gewählten Werkzeuge, die Projektplanung sowie die dabei aufgetretenen Probleme. From ff263d86b669c006b525e559f08af5ae196159b0 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:03:03 +0100 Subject: [PATCH 28/53] extend the bibliographies --- docs/andreas.bib | 9 ++++ docs/andreas_general.bib | 99 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 docs/andreas.bib diff --git a/docs/andreas.bib b/docs/andreas.bib new file mode 100644 index 0000000..218216b --- /dev/null +++ b/docs/andreas.bib @@ -0,0 +1,9 @@ +@misc{django_extensions, + month = {{01}}, + note = {{\url{https://github.com/django-extensions/django-extensions}}}, + Urldate = {{2018-01-05}}, + author = {django-extensions}, + title = {{Django Extensions Source Code}}, + year = {2018}, +} + diff --git a/docs/andreas_general.bib b/docs/andreas_general.bib index 249d7da..8d5f7da 100644 --- a/docs/andreas_general.bib +++ b/docs/andreas_general.bib @@ -50,3 +50,102 @@ year = {2018}, } +@misc{usecase, + month = {{01}}, + note = {{\url{https://de.wikipedia.org/wiki/Anwendungsfall}}}, + Urldate = {{2018-01-04}}, + author = {Wikipedia}, + title = {{Anwendungsfall {--} Wikipedia}}, + year = {2018}, +} + +@misc{usecasediagramm, + month = {{01}}, + note = {{\url{https://de.wikipedia.org/wiki/Anwendungsfalldiagramm}}}, + Urldate = {{2018-01-04}}, + author = {Wikipedia}, + title = {{Anwendungsfalldiagramm {--} Wikipedia}}, + year = {2018}, +} + +@misc{django, + month = {{01}}, + note = {{\url{https://www.djangoproject.com/}}}, + Urldate = {{2018-01-04}}, + author = {Django Project}, + title = {{Django Framework}}, + year = {2018}, +} + +@misc{apache, + month = {{01}}, + note = {{\url{https://httpd.apache.org/}}}, + Urldate = {{2018-01-04}}, + author = {Apache Foundation}, + title = {{The Apache HTTP Server Project}}, + year = {2018}, +} + +@misc{mariadb, + month = {{01}}, + note = {{\url{https://mariadb.org/}}}, + Urldate = {{2018-01-04}}, + author = {Mariadb Foundation}, + title = {{MariaDB}}, + year = {2018}, +} + +@misc{emacs, + month = {{01}}, + note = {{\url{https://www.gnu.org/software/emacs/}}}, + Urldate = {{2018-01-04}}, + author = {GNU Project}, + title = {{GNU Emacs}}, + year = {2018}, +} + +@misc{atom, + month = {{01}}, + note = {{\url{https://atom.io/}}}, + Urldate = {{2018-01-04}}, + author = {GitHub Inc.}, + title = {{Atom Editor}}, + year = {2018}, +} + +@misc{mariadbgov, + month = {{01}}, + note = {{\url{https://mariadb.org/about/governance/}}}, + Urldate = {{2018-01-04}}, + author = {MariaDB Foundation}, + title = {{Governance}}, + year = {2018}, +} + +@misc{inkscape, + month = {{01}}, + note = {{\url{https://inkscape.org/en/}}}, + Urldate = {{2018-01-05}}, + author = {Inkscape Developers}, + title = {{Inkscape}}, + year = {2018}, +} + +@misc{orgmode, + month = {{01}}, + note = {{\url{https://orgmode.org/}}}, + Urldate = {{2018-01-05}}, + author = {Carsten Dominik}, + title = {{Org mode for Emacs}}, + year = {2018}, +} + +@misc{virtualbox, + month = {{01}}, + note = {{\url{https://www.virtualbox.org/}}}, + Urldate = {{2018-01-05}}, + author = {Oracle}, + title = {{Oracle VM VirtualBox}}, + year = {2018}, +} + From 44cb2844d75762f0089c50582b0cd9b5dd400e57 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:03:17 +0100 Subject: [PATCH 29/53] add a risk analysis diagramm --- docs/diagrammes/risk_analysis.eps | 561 ++++++++++++++++++++++++++++++ docs/diagrammes/risk_analysis.svg | 530 ++++++++++++++++++++++++++++ 2 files changed, 1091 insertions(+) create mode 100644 docs/diagrammes/risk_analysis.eps create mode 100644 docs/diagrammes/risk_analysis.svg diff --git a/docs/diagrammes/risk_analysis.eps b/docs/diagrammes/risk_analysis.eps new file mode 100644 index 0000000..fbc4e72 --- /dev/null +++ b/docs/diagrammes/risk_analysis.eps @@ -0,0 +1,561 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: cairo 1.14.10 (http://cairographics.org) +%%CreationDate: Fri Jan 5 14:59:13 2018 +%%Pages: 1 +%%DocumentData: Clean7Bit +%%LanguageLevel: 2 +%%BoundingBox: 0 -1 616 599 +%%EndComments +%%BeginProlog +save +50 dict begin +/q { gsave } bind def +/Q { grestore } bind def +/cm { 6 array astore concat } bind def +/w { setlinewidth } bind def +/J { setlinecap } bind def +/j { setlinejoin } bind def +/M { setmiterlimit } bind def +/d { setdash } bind def +/m { moveto } bind def +/l { lineto } bind def +/c { curveto } bind def +/h { closepath } bind def +/re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto + 0 exch rlineto 0 rlineto closepath } bind def +/S { stroke } bind def +/f { fill } bind def +/f* { eofill } bind def +/n { newpath } bind def +/W { clip } bind def +/W* { eoclip } bind def +/BT { } bind def +/ET { } bind def +/pdfmark where { pop globaldict /?pdfmark /exec load put } + { globaldict begin /?pdfmark /pop load def /pdfmark + /cleartomark load def end } ifelse +/BDC { mark 3 1 roll /BDC pdfmark } bind def +/EMC { mark /EMC pdfmark } bind def +/cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def +/Tj { show currentpoint cairo_store_point } bind def +/TJ { + { + dup + type /stringtype eq + { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse + } forall + currentpoint cairo_store_point +} bind def +/cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore + cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def +/Tf { pop /cairo_font exch def /cairo_font_matrix where + { pop cairo_selectfont } if } bind def +/Td { matrix translate cairo_font_matrix matrix concatmatrix dup + /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point + /cairo_font where { pop cairo_selectfont } if } bind def +/Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def + cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def +/g { setgray } bind def +/rg { setrgbcolor } bind def +/d1 { setcachedevice } bind def +/cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def +/cairo_image { image cairo_flush_ascii85_file } def +/cairo_imagemask { imagemask cairo_flush_ascii85_file } def +%%EndProlog +%%BeginSetup +%%BeginResource: font DejaVuSans +11 dict begin +/FontType 42 def +/FontName /DejaVuSans def +/PaintType 0 def +/FontMatrix [ 1 0 0 1 0 0 ] def +/FontBBox [ 0 0 0 0 ] def +/Encoding 256 array def +0 1 255 { Encoding exch /.notdef put } for +Encoding 46 /period put +Encoding 49 /one put +Encoding 50 /two put +Encoding 51 /three put +Encoding 52 /four put +Encoding 53 /five put +Encoding 65 /A put +Encoding 72 /H put +Encoding 77 /M put +Encoding 84 /T put +Encoding 87 /W put +Encoding 97 /a put +Encoding 99 /c put +Encoding 101 /e put +Encoding 102 /f put +Encoding 103 /g put +Encoding 104 /h put +Encoding 105 /i put +Encoding 107 /k put +Encoding 108 /l put +Encoding 110 /n put +Encoding 111 /o put +Encoding 114 /r put +Encoding 115 /s put +Encoding 116 /t put +Encoding 117 /u put +Encoding 119 /w put +/CharStrings 28 dict dup begin +/.notdef 0 def +/W 1 def +/a 2 def +/h 3 def +/r 4 def +/s 5 def +/c 6 def +/e 7 def +/i 8 def +/n 9 def +/l 10 def +/k 11 def +/t 12 def +/A 13 def +/u 14 def +/w 15 def +/g 16 def +/T 17 def +/f 18 def +/M 19 def +/H 20 def +/o 21 def +/one 22 def +/period 23 def +/five 24 def +/two 25 def +/four 26 def +/three 27 def +end readonly def +/sfnts [ +<0001000000090080000300106376742000691d3900001558000001fe6670676d7134766a0000 +1758000000ab676c7966e96b548c0000009c000014bc686561640d1447cc0000180400000036 +686865610d9f07890000183c00000024686d7478846c0eb800001860000000706c6f63610001 +3608000018d0000000746d617870048906710000194400000020707265703b07f10000001964 +0000056800020066fe96046605a400030007001a400c04fb0006fb0108057f0204002fc4d4ec +310010d4ecd4ec301311211125211121660400fc73031bfce5fe96070ef8f272062900010044 +000007a605d5000c017b4049051a0605090a09041a0a09031a0a0b0a021a01020b0b0a061107 +080705110405080807021103020c000c011100000c420a050203060300af0b080c0b0a090806 +05040302010b07000d10d4cc173931002f3cec32321739304b5358071005ed071008ed071008 +ed071005ed071008ed071005ed0705ed071008ed5922b2000e01015d40f206020605020a000a +000a120a2805240a200a3e023e05340a300a4c024d05420a400a59026a026b05670a600a7b02 +7f027c057f05800a960295051d07000902080300040605000500060107040800080709000904 +0a0a0c000e1a0315041508190c100e200421052006200720082309240a250b200e200e3c023a +033504330530083609390b3f0c300e460046014a024004450540054206420742084008400944 +0a4d0c400e400e58025608590c500e66026703610462056006600760086409640a640b770076 +017b027803770474057906790777087008780c7f0c7f0e860287038804890585098a0b8f0e97 +049f0eaf0e5b5d005d1333090133090133012309012344cc013a0139e3013a0139cdfe89fefe +c5fec2fe05d5fb1204eefb1204eefa2b0510faf000000002007bffe3042d047b000a002500bc +4027191f0b17090e00a91706b90e1120861fba1cb923b8118c170c001703180d09080b1f0308 +14452610fcecccd4ec323211393931002fc4e4f4fcf4ec10c6ee10ee11391139123930406e30 +1d301e301f3020302130223f27401d401e401f402040214022501d501e501f50205021502250 +277027851d871e871f8720872185229027a027f0271e301e301f30203021401e401f40204021 +501e501f50205021601e601f60206021701e701f70207021801e801f80208021185d015d0122 +061514163332363d01371123350e01232226353436332135342623220607353e0133321602be +dfac816f99b9b8b83fbc88accbfdfb0102a79760b65465be5af3f00233667b6273d9b4294cfd +81aa6661c1a2bdc0127f8b2e2eaa2727fc00000100ba00000464061400130034401903090003 +0e0106870e11b80c970a010208004e0d09080b461410fcec32f4ec31002f3cecf4c4ec111217 +3930b2601501015d0111231134262322061511231133113e013332160464b87c7c95acb9b942 +b375c1c602a4fd5c029e9f9ebea4fd870614fd9e6564ef00000100ba0000034a047b00110030 +4014060b0700110b03870eb809bc070a06080008461210fcc4ec3231002fe4f4ecc4d4cc1112 +3930b450139f1302015d012e012322061511231133153e0133321617034a1f492c9ca7b9b93a +ba85132e1c03b41211cbbefdb20460ae6663050500000001006fffe303c7047b002700e7403c +0d0c020e0b531f1e080902070a531f1f1e420a0b1e1f041500860189041486158918b91104b9 +25b8118c281e0a0b1f1b0700521b080e07081422452810fcc4ecd4ece4111239393939310010 +e4f4ec10fef5ee10f5ee121739304b535807100eed111739070eed1117395922b2002701015d +406d1c0a1c0b1c0c2e092c0a2c0b2c0c3b093b0a3b0b3b0c0b200020012402280a280b2a132f +142f152a16281e281f292029212427860a860b860c860d12000000010202060a060b030c030d +030e030f03100319031a031b031c041d09272f293f295f297f2980299029a029f029185d005d +7101152e012322061514161f011e0115140623222627351e013332363534262f012e01353436 +333216038b4ea85a898962943fc4a5f7d85ac36c66c661828c65ab40ab98e0ce66b4043fae28 +2854544049210e2a99899cb62323be353559514b50250f2495829eac1e00000000010071ffe3 +03e7047b0019003f401b00860188040e860d880ab91104b917b8118c1a07120d004814451a10 +fce432ec310010e4f4ec10fef4ee10f5ee30400b0f1b101b801b901ba01b05015d01152e0123 +220615141633323637150e0123220011100021321603e74e9d50b3c6c6b3509d4e4da55dfdfe +d6012d010655a20435ac2b2be3cdcde32b2baa2424013e010e0112013a23000000020071ffe3 +047f047b0014001b00704024001501098608880515a90105b90c01bb18b912b80c8c1c1b1502 +081508004b02120f451c10fcecf4ecc4111239310010e4f4ece410ee10ee10f4ee1112393040 +293f1d701da01dd01df01d053f003f013f023f153f1b052c072f082f092c0a6f006f016f026f +156f1b095d71015d0115211e0133323637150e01232000111000333200072e0123220607047f +fcb20ccdb76ac76263d06bfef4fec70129fce20107b802a5889ab90e025e5abec73434ae2a2c +0138010a01130143feddc497b4ae9e00000200c100000179061400030007002b400e06be04b1 +00bc020501080400460810fc3cec3231002fe4fcec30400b1009400950096009700905015d13 +33112311331523c1b8b8b8b80460fba00614e900000100ba00000464047b0013003640190309 +00030e0106870e11b80cbc0a010208004e0d09080b461410fcec32f4ec31002f3ce4f4c4ec11 +12173930b46015cf1502015d0111231134262322061511231133153e013332160464b87c7c95 +acb9b942b375c1c602a4fd5c029e9f9ebea4fd870460ae6564ef000100c10000017906140003 +0022b7009702010800460410fcec31002fec30400d10054005500560057005f00506015d1333 +1123c1b8b80614f9ec00000100ba0000049c0614000a00bc4029081105060507110606050311 +0405040211050504420805020303bc009709060501040608010800460b10fcec32d4c4113931 +002f3cece41739304b5358071004ed071005ed071005ed071004ed5922b2100c01015d405f04 +020a081602270229052b0856026602670873027705820289058e08930296059708a302120905 +0906020b030a072803270428052b062b07400c6803600c8903850489058d068f079a039707aa +03a705b607c507d607f703f003f704f0041a5d71005d1333110133090123011123bab90225eb +fdae026bf0fdc7b90614fc6901e3fdf4fdac0223fddd00010037000002f2059e001300384019 +0e05080f03a9001101bc08870a0b08090204000810120e461410fc3cc4fc3cc432393931002f +ecf43cc4ec3211393930b2af1501015d01112115211114163b01152322263511233533110177 +017bfe854b73bdbdd5a28787059efec28ffda0894e9a9fd202608f013e000000000200100000 +056805d50002000a00c2404100110100040504021105050401110a030a0011020003030a0711 +050406110505040911030a08110a030a4200030795010381090509080706040302010009050a +0b10d4c4173931002f3ce4d4ec1239304b5358071005ed0705ed071005ed0705ed071008ed07 +1005ed071005ed071008ed5922b2200c01015d40420f010f020f070f080f005800760070008c +000907010802060309041601190256015802500c67016802780176027c037204770778088701 +8802800c980299039604175d005d090121013301230321032302bcfeee0225fe7be50239d288 +fd5f88d5050efd1903aefa2b017ffe810000000200aeffe30458047b00130014003b401c0309 +00030e0106870e118c0a01bc14b80c0d0908140b4e020800461510fcecf439ec3231002fe4e4 +32f4c4ec1112173930b46f15c01502015d1311331114163332363511331123350e0123222601 +aeb87c7c95adb8b843b175c1c801cf01ba02a6fd619f9fbea4027bfba0ac6663f003a8000001 +0056000006350460000c01eb404905550605090a0904550a0903550a0b0a025501020b0b0a06 +1107080705110405080807021103020c000c011100000c420a050203060300bf0b080c0b0a09 +080605040302010b07000d10d44bb00a544bb011545b4bb012545b4bb013545b4bb00b545b58 +b9000000403859014bb00c544bb00d545b4bb010545b58b90000ffc03859cc173931002f3cec +32321739304b5358071005ed071008ed071008ed071005ed071008ed071005ed0705ed071008 +ed59220140ff050216021605220a350a49024905460a400a5b025b05550a500a6e026e05660a +79027f0279057f05870299029805940abc02bc05ce02c703cf051d0502090306040b050a080b +09040b050c1502190316041a051b081b09140b150c2500250123022703210425052206220725 +082709240a210b230c390336043608390c300e46024803460440044205400640074008440944 +0a440b400e400e560056015602500451055206520750085309540a550b6300640165026a0365 +046a056a066a076e09610b670c6f0e7500750179027d0378047d057a067f067a077f07780879 +097f097b0a760b7d0c870288058f0e97009701940293039c049b05980698079908402f960c9f +0ea600a601a402a403ab04ab05a906a907ab08a40caf0eb502b103bd04bb05b809bf0ec402c3 +03cc04ca05795d005d13331b01331b013301230b012356b8e6e5d9e6e5b8fedbd9f1f2d90460 +fc96036afc96036afba00396fc6a00020071fe56045a047b000b0028004a4023190c1d091286 +1316b90f03b92623b827bc09b90fbd1a1d261900080c4706121220452910fcc4ecf4ec323231 +002fc4e4ece4f4c4ec10fed5ee1112393930b6602a802aa02a03015d01342623220615141633 +323617100221222627351e013332363d010e0123220211101233321617353303a2a59594a5a5 +9495a5b8fefefa61ac51519e52b5b439b27ccefcfcce7cb239b8023dc8dcdcc8c7dcdcebfee2 +fee91d1eb32c2abdbf5b6362013a01030104013a6263aa000001fffa000004e905d50007004a +400e0602950081040140031c0040050810d4e4fce431002ff4ec3230014bb00a5458bd000800 +40000100080008ffc03811373859401300091f00100110021f071009400970099f09095d0321 +1521112311210604effdeecbfdee05d5aafad5052b000001002f000002f8061400130059401c +0510010c08a906018700970e06bc0a02130700070905080d0f0b4c1410fc4bb00a5458b9000b +004038594bb00e5458b9000bffc038593cc4fc3cc4c412393931002fe432fcec10ee32123939 +3001b640155015a015035d01152322061d012115211123112335333534363302f8b0634d012f +fed1b9b0b0aebd0614995068638ffc2f03d18f4ebbab000100c90000061f05d5000c00bf4034 +03110708070211010208080702110302090a0901110a0a09420a070203080300af080b050908 +030201050a061c043e0a1c00040d10fcecfcec11173931002f3cc4ec32111739304b53580710 +05ed071008ed071008ed071005ed5922b2700e01015d405603070f080f09020a15021407130a +260226072007260a200a3407350a69027c027b07790a80028207820a90021604010b0313011b +0323012c032708280934013c035608590965086a097608790981018d0395019b03145d005d13 +210901211123110123011123c9012d017d017f012dc5fe7fcbfe7fc405d5fc0803f8fa2b051f +fc000400fae10000000100c90000053b05d5000b002c4014089502ad0400810a0607031c0538 +09011c00040c10fcec32fcec3231002f3ce432fcec30b2500d01015d13331121113311231121 +1123c9ca02decacafd22ca05d5fd9c0264fa2b02c7fd390000020071ffe30475047b000b0017 +004a401306b91200b90cb8128c1809120f51031215451810fcecf4ec310010e4f4ec10ee3040 +233f197b007b067f077f087f097f0a7f0b7b0c7f0d7f0e7f0f7f107f117b12a019f01911015d +012206151416333236353426273200111000232200111000027394acab9593acac93f00112fe +eef0f1feef011103dfe7c9c9e7e8c8c7e99cfec8feecfeedfec7013901130114013800000001 +00e10000045a05d5000a004040154203a00402a005810700a009081f061c03001f010b10d44b +b00f5458b9000100403859ecc4fcec31002fec32f4ecd4ec304b5358592201b40f030f04025d +3721110535253311211521fe014afe990165ca014afca4aa047348b848fad5aa0000000100db +000001ae00fe00030011b7008302011900180410fcec31002fec3037331523dbd3d3fefe0001 +009effe3046405d5001d005e4023041a071186101d1aa00714a010890d02a000810d8c07a41e +171c010a031c000a10061e10fc014bb016544bb014545b58b90010ffc038594bb00f5458b900 +1000403859c4d4ec10c4ee310010e4e4f4ec10e6ee10fec410ee1112393013211521113e0133 +320015140021222627351e0133323635342623220607dd0319fda02c582cfa0124fed4feef5e +c3685ac06badcacaad51a15405d5aafe920f0ffeeeeaf1fef52020cb3130b69c9cb624260000 +000100960000044a05f0001c009e4027191a1b03181c11050400110505044210a111940da014 +910400a00200100a02010a1c171003061d10fc4bb015544bb016545b4bb014545b58b90003ff +c03859c4d4ecc0c011123931002fec32f4ecf4ec304b5358071005ed0705ed01b01c10111739 +59220140325504560556077a047a05761b87190704000419041a041b051c74007606751a731b +741c82008619821a821b821ca800a81b115d005d25211521353600373e013534262322060735 +3e01333204151406070600018902c1fc4c73018d33614da7865fd3787ad458e80114455b19fe +f4aaaaaa7701913a6d974977964243cc3132e8c25ca5701dfeeb000000020064000004a405d5 +0002000d0081401d010d030d0003030d4200030b07a00501038109010c0a001c0608040c0e10 +dc4bb00b544bb00d545b58b9000cffc03859d43cc4ec32113931002fe4d43cec321239304b53 +58071004c9071005c9592201402a0b002a0048005900690077008a000716012b0026012b0336 +014e014f0c4f0d5601660175017a0385010d5d005d09012103331133152311231121350306fe +0201fe35fed5d5c9fd5e0525fce303cdfc33a8fea00160c300000001009cffe3047305f00028 +0070402e0015130a86091f862013a0150da00993061ca020932391068c15a329161c13000314 +191c2620101c03141f09062910fc4bb016544bb014545b58b90009ffc03859c4c4d4ecf4ec11 +173939310010ece4f4e4ec10e6ee10ee10ee10ee11123930014009641e611f6120642104005d +011e0115140421222627351e013332363534262b013533323635342623220607353e01333204 +151406033f91a3fed0fee85ec76a54c86dbec7b9a5aeb6959ea39853be7273c959e6010c8e03 +251fc490ddf22525c33132968f8495a67770737b2426b42020d1b27cab00013500b800cb00cb +00c100aa009c01a600b800660000007100cb00a002b20085007500b800c301cb0189022d00cb +00a600f000d300aa008700cb03aa0400014a003300cb000000d9050200f4015400b4009c0139 +0114013907060400044e04b4045204b804e704cd0037047304cd04600473013303a2055605a6 +0556053903c5021200c9001f00b801df007300ba03e9033303bc0444040e00df03cd03aa00e5 +03aa0404000000cb008f00a4007b00b80014016f007f027b0252008f00c705cd009a009a006f +00cb00cd019e01d300f000ba018300d5009803040248009e01d500c100cb00f600830354027f +00000333026600d300c700a400cd008f009a0073040005d5010a00fe022b00a400b4009c0000 +0062009c0000001d032d05d505d505d505f0007f007b005400a406b80614072301d300b800cb +00a601c301ec069300a000d3035c037103db0185042304a80448008f0139011401390360008f +05d5019a0614072306660179046004600460047b009c00000277046001aa00e904600762007b +00c5007f027b000000b4025205cd006600bc00660077061000cd013b01850389008f007b0000 +001d00cd074a042f009c009c0000077d006f0000006f0335006a006f007b00ae00b2002d0396 +008f027b00f600830354063705f6008f009c04e10266008f018d02f600cd03440029006604ee +00730000140000960000b707060504030201002c2010b002254964b040515820c859212d2cb0 +02254964b040515820c859212d2c20100720b00050b00d7920b8ffff5058041b0559b0051cb0 +032508b0042523e120b00050b00d7920b8ffff5058041b0559b0051cb0032508e12d2c4b5058 +20b0fd454459212d2cb002254560442d2c4b5358b00225b0022545445921212d2c45442d2cb0 +0225b0022549b00525b005254960b0206368208a108a233a8a10653a2d000001000000025eb8 +895c16c05f0f3cf5001f080000000000d3d94ef700000000d3d94ef7f7d6fc4c0e5909dc0000 +0008000000010000000000010000076dfe1d00000efef7d6fa510e5900010000000000000000 +000000000000001c04cd006607e9004404e7007b051200ba034a00ba042b006f0466007104ec +0071023900c1051200ba023900c104a200ba0323003705790010051200ae068b005605140071 +04e3fffa02d1002f06e700c9060400c904e50071051700e1028b00db0517009e051700960517 +00640517009c0000000000000044000002000000032c000003a400000414000005740000060c +000006e000000730000007a8000007e4000008d40000095000000a4c00000ad000000cf40000 +0dbc00000e2c00000ec400000fc00000101c000010c000001130000011580000121800001318 +000013d4000014bc00010000001c0354002b0068000c00020010009900080000041502160008 +0004b8028040fffbfe03fa1403f92503f83203f79603f60e03f5fe03f4fe03f32503f20e03f1 +9603f02503ef8a4105effe03ee9603ed9603ecfa03ebfa03eafe03e93a03e84203e7fe03e632 +03e5e45305e59603e48a4105e45303e3e22f05e3fa03e22f03e1fe03e0fe03df3203de1403dd +9603dcfe03db1203da7d03d9bb03d8fe03d68a4105d67d03d5d44705d57d03d44703d3d21b05 +d3fe03d21b03d1fe03d0fe03cffe03cefe03cd9603cccb1e05ccfe03cb1e03ca3203c9fe03c6 +851105c61c03c51603c4fe03c3fe03c2fe03c1fe03c0fe03bffe03befe03bdfe03bcfe03bbfe +03ba1103b9862505b9fe03b8b7bb05b8fe03b7b65d05b7bb03b78004b6b52505b65d40ff03b6 +4004b52503b4fe03b39603b2fe03b1fe03b0fe03affe03ae6403ad0e03acab2505ac6403abaa +1205ab2503aa1203a98a4105a9fa03a8fe03a7fe03a6fe03a51203a4fe03a3a20e05a33203a2 +0e03a16403a08a4105a096039ffe039e9d0c059efe039d0c039c9b19059c64039b9a10059b19 +039a1003990a0398fe0397960d0597fe03960d03958a410595960394930e05942803930e0392 +fa039190bb0591fe03908f5d0590bb039080048f8e25058f5d038f40048e25038dfe038c8b2e +058cfe038b2e038a8625058a410389880b05891403880b038786250587640386851105862503 +85110384fe038382110583fe0382110381fe0380fe037ffe0340ff7e7d7d057efe037d7d037c +64037b5415057b25037afe0379fe03780e03770c03760a0375fe0374fa0373fa0372fa0371fa +0370fe036ffe036efe036c21036bfe036a1142056a530369fe03687d036711420566fe0365fe +0364fe0363fe0362fe03613a0360fa035e0c035dfe035bfe035afe0359580a0559fa03580a03 +5716190557320356fe035554150555420354150353011005531803521403514a130551fe0350 +0b034ffe034e4d10054efe034d10034cfe034b4a13054bfe034a4910054a1303491d0d054910 +03480d0347fe0346960345960344fe0343022d0543fa0342bb03414b0340fe033ffe033e3d12 +053e14033d3c0f053d12033c3b0d053c40ff0f033b0d033afe0339fe033837140538fa033736 +100537140336350b05361003350b03341e03330d0332310b0532fe03310b03302f0b05300d03 +2f0b032e2d09052e10032d09032c32032b2a25052b64032a2912052a25032912032827250528 +410327250326250b05260f03250b0324fe0323fe03220f03210110052112032064031ffa031e +1d0d051e64031d0d031c1142051cfe031bfa031a42031911420519fe031864031716190517fe +031601100516190315fe0314fe0313fe031211420512fe0311022d05114203107d030f64030e +fe030d0c16050dfe030c0110050c16030bfe030a100309fe0308022d0508fe03071403066403 +0401100504fe03401503022d0503fe0302011005022d0301100300fe0301b80164858d012b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b002b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b1d00> +] def +/f-0-0 currentdict end definefont pop +%%EndResource +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +%%PageBoundingBox: 0 -1 616 599 +%%EndPageSetup +q 0 -1 616 600 rectclip q +1 0 0 rg +445.023 597.336 170.078 -170.082 re f +0 g +1.417323 w +0 J +0 j +[] 0.0 d +4 M q 1 0 0 -1 0 598.042908 cm +445.023 0.707 170.078 170.082 re S Q +1 0 0 rg +274.945 597.336 170.078 -170.082 re f +0 g +q 1 0 0 -1 0 598.042908 cm +274.945 0.707 170.078 170.082 re S Q +0 0.501961 0 rg +274.945 257.176 170.078 -170.078 re f +0 g +q 1 0 0 -1 0 598.042908 cm +274.945 340.867 170.078 170.078 re S Q +1 1 0 rg +274.945 427.254 170.078 -170.078 re f +0 g +q 1 0 0 -1 0 598.042908 cm +274.945 170.789 170.078 170.078 re S Q +0 0.501961 0 rg +104.867 257.176 170.078 -170.078 re f +0 g +q 1 0 0 -1 0 598.042908 cm +104.867 340.867 170.078 170.078 re S Q +0 0.501961 0 rg +104.867 427.254 170.078 -170.078 re f +0 g +q 1 0 0 -1 0 598.042908 cm +104.867 170.789 170.078 170.078 re S Q +1 1 0 rg +104.867 597.336 170.078 -170.082 re f +0 g +q 1 0 0 -1 0 598.042908 cm +104.867 0.707 170.078 170.082 re S Q +1 0 0 rg +445.023 427.254 170.078 -170.078 re f +0 g +q 1 0 0 -1 0 598.042908 cm +445.023 170.789 170.078 170.078 re S Q +1 1 0 rg +445.023 257.176 170.078 -170.078 re f +0 g +q 1 0 0 -1 0 598.042908 cm +445.023 340.867 170.078 170.078 re S Q +BT +0 30 -30 0 22.792967 187.058381 Tm +/f-0-0 1 Tf +[(W)65(ahrs)-3(cheinlich)-3(k)34(eit)]TJ +29.999999 0 0 29.999999 278.242938 6.24024 Tm +[(Auswirk)28(ung)]TJ +0 29.999999 -29.999999 0 94.63873 148.911032 Tm +[(T)31(ief)]TJ +29.999999 0 0 29.999999 314.60842 51.541542 Tm +[(Mittel)-3268(Hoch)]TJ +0 29.999999 -29.999999 0 94.63873 478.456786 Tm +[(Hoch)8257(Mittel)]TJ +29.999999 0 0 29.999999 156.686484 51.541542 Tm +[(T)31(ief)]TJ +ET +1 g +551.742 316.105 m 551.742 297.695 536.816 282.769 518.406 282.769 c 499.996 + 282.769 485.07 297.695 485.07 316.105 c 485.07 334.516 499.996 349.441 +518.406 349.441 c 536.816 349.441 551.742 334.516 551.742 316.105 c h +551.742 316.105 m f +0 g +q 1 0 0 -1 0 598.042908 cm +551.742 281.938 m 551.742 300.348 536.816 315.273 518.406 315.273 c 499.996 + 315.273 485.07 300.348 485.07 281.938 c 485.07 263.527 499.996 248.602 +518.406 248.602 c 536.816 248.602 551.742 263.527 551.742 281.938 c h +551.742 281.938 m S Q +BT +30 0 0 30 507.042391 306.198067 Tm +/f-0-0 1 Tf +(1.)Tj +ET +0.918425 w +q 1 0 0 -1 0 598.042908 cm +567.922 234.48 m 508.152 288.047 567.922 234.48 567.922 234.48 c h +567.922 234.48 m S Q +561.082 357.434 m 560.801 352.246 l 567.922 363.562 l 555.895 357.719 l + h +561.082 357.434 m f* +0.729536 w +q -1 -0.896231 -0.896231 1 0 598.042908 cm +-191.568 -412.298 m -188.833 -415.035 l -198.407 -412.299 l -188.833 -409.562 + l h +-191.568 -412.298 m S Q +1 g +215.672 500.855 m 215.672 482.445 200.75 467.523 182.34 467.523 c 163.93 + 467.523 149.004 482.445 149.004 500.855 c 149.004 519.266 163.93 534.191 + 182.34 534.191 c 200.75 534.191 215.672 519.266 215.672 500.855 c h +215.672 500.855 m f +0 g +1.417323 w +q 1 0 0 -1 0 598.042908 cm +215.672 97.188 m 215.672 115.598 200.75 130.52 182.34 130.52 c 163.93 130.52 + 149.004 115.598 149.004 97.188 c 149.004 78.777 163.93 63.852 182.34 63.852 + c 200.75 63.852 215.672 78.777 215.672 97.188 c h +215.672 97.188 m S Q +BT +30 0 0 30 170.973909 490.950546 Tm +/f-0-0 1 Tf +(5.)Tj +ET +0.918425 w +q 1 0 0 -1 0 598.042908 cm +231.855 49.727 m 172.082 103.297 231.855 49.727 231.855 49.727 c h +231.855 49.727 m S Q +225.016 542.187 m 224.73 537 l 231.855 548.316 l 219.828 542.469 l h +225.016 542.187 m f* +0.729536 w +q -1 -0.896231 -0.896231 1 0 598.042908 cm +-97.024 -142.811 m -94.287 -145.546 l -103.863 -142.812 l -94.287 -140.077 + l h +-97.024 -142.811 m S Q +1 g +361.516 152.734 m 361.516 134.324 346.59 119.398 328.18 119.398 c 309.77 + 119.398 294.844 134.324 294.844 152.734 c 294.844 171.144 309.77 186.066 + 328.18 186.066 c 346.59 186.066 361.516 171.144 361.516 152.734 c h +361.516 152.734 m f +0 g +1.417323 w +q 1 0 0 -1 0 598.042908 cm +361.516 445.309 m 361.516 463.719 346.59 478.645 328.18 478.645 c 309.77 + 478.645 294.844 463.719 294.844 445.309 c 294.844 426.898 309.77 411.977 + 328.18 411.977 c 346.59 411.977 361.516 426.898 361.516 445.309 c h +361.516 445.309 m S Q +BT +30 0 0 30 316.814683 142.82673 Tm +/f-0-0 1 Tf +(2.)Tj +ET +0.918425 w +q 1 0 0 -1 0 598.042908 cm +377.695 397.852 m 317.926 451.418 377.695 397.852 377.695 397.852 c h +377.695 397.852 m S Q +370.855 194.062 m 370.57 188.875 l 377.695 200.191 l 365.668 194.348 l +h +370.855 194.062 m f* +0.729536 w +q -1 -0.896231 -0.896231 1 0 598.042908 cm +-4.878 -408.352 m -2.141 -411.087 l -11.717 -408.353 l -2.143 -405.616 +l h +-4.878 -408.352 m S Q +1 g +210.371 154.25 m 210.371 135.84 195.445 120.914 177.035 120.914 c 158.625 + 120.914 143.699 135.84 143.699 154.25 c 143.699 172.66 158.625 187.582 +177.035 187.582 c 195.445 187.582 210.371 172.66 210.371 154.25 c h +210.371 154.25 m f +0 g +1.417323 w +q 1 0 0 -1 0 598.042908 cm +210.371 443.793 m 210.371 462.203 195.445 477.129 177.035 477.129 c 158.625 + 477.129 143.699 462.203 143.699 443.793 c 143.699 425.383 158.625 410.461 + 177.035 410.461 c 195.445 410.461 210.371 425.383 210.371 443.793 c h +210.371 443.793 m S Q +BT +30 0 0 30 165.670608 144.341962 Tm +/f-0-0 1 Tf +(4.)Tj +ET +0.918425 w +q 1 0 0 -1 0 598.042908 cm +226.551 396.336 m 166.781 449.902 226.551 396.336 226.551 396.336 c h +226.551 396.336 m S Q +219.711 195.578 m 219.43 190.391 l 226.551 201.707 l 214.523 195.863 l +h +219.711 195.578 m f* +0.729536 w +q -1 -0.896231 -0.896231 1 0 598.042908 cm +78.188 -332.391 m 80.922 -335.128 l 71.348 -332.391 l 80.923 -329.654 l + h +78.188 -332.391 m S Q +1 g +378.559 322.059 m 378.559 303.648 363.637 288.727 345.227 288.727 c 326.816 + 288.727 311.891 303.648 311.891 322.059 c 311.891 340.469 326.816 355.394 + 345.227 355.394 c 363.637 355.394 378.559 340.469 378.559 322.059 c h +378.559 322.059 m f +0 g +1.417323 w +q 1 0 0 -1 0 598.042908 cm +378.559 275.984 m 378.559 294.395 363.637 309.316 345.227 309.316 c 326.816 + 309.316 311.891 294.395 311.891 275.984 c 311.891 257.574 326.816 242.648 + 345.227 242.648 c 363.637 242.648 378.559 257.574 378.559 275.984 c h +378.559 275.984 m S Q +BT +30 0 0 30 333.861 312.153541 Tm +/f-0-0 1 Tf +(3.)Tj +ET +0.918425 w +q 1 0 0 -1 0 598.042908 cm +394.742 228.523 m 334.969 282.094 394.742 228.523 394.742 228.523 c h +394.742 228.523 m S Q +387.902 363.391 m 387.617 358.203 l 394.742 369.519 l 382.715 363.672 l + h +387.902 363.391 m f* +0.729536 w +q -1 -0.896231 -0.896231 1 0 598.042908 cm +-98.49 -322.922 m -95.753 -325.657 l -105.329 -322.923 l -95.753 -320.188 + l h +-98.49 -322.922 m S Q +Q Q +showpage +%%Trailer +end restore +%%EOF diff --git a/docs/diagrammes/risk_analysis.svg b/docs/diagrammes/risk_analysis.svg new file mode 100644 index 0000000..54c5f45 --- /dev/null +++ b/docs/diagrammes/risk_analysis.svg @@ -0,0 +1,530 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + Wahrscheinlichkeit AuswirkluAus Auswirkung + Tief + Mittel + Hoch + Hoch + Mittel + Tief + + + + + + + + 1. + + + + + + 5. + + + + + + 2. + + + + + + 4. + + + + + + 3. + + + + From aade0163120cb447ed6b9604c18602130ab77aef Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:03:34 +0100 Subject: [PATCH 30/53] threat headings down to level 5 as sections --- docs/doku.org | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/doku.org b/docs/doku.org index f0c5aa8..44c9d3f 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -4,6 +4,7 @@ #+LaTeX_CLASS: article #+LATEX_CLASS_OPTIONS: [a4paper,11pt] #+LaTeX_HEADER: \input{style} +#+OPTIONS: H:5 * Über dieses Dokument From e9b8d35ffc12120781554b124746deda94b5995e Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:04:33 +0100 Subject: [PATCH 31/53] update the documentation --- docs/doku.org | 481 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 398 insertions(+), 83 deletions(-) diff --git a/docs/doku.org b/docs/doku.org index 44c9d3f..e8f76fb 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -6,15 +6,17 @@ #+LaTeX_HEADER: \input{style} #+OPTIONS: H:5 -* Über dieses Dokument + +* TODO Über dieses Dokument Im nachfolgenden Abschnitt finden Sie allgemeine Informationen zu -diesem Dokument. Bei der Erstellung dieses Dokuments haben wir das -Versionierungs-Tool "Git" mit dem passenden Client "magit" verwendet -und das Dokument auf unseren Laptops lokal mit dem Emacs Plugin -org-mode bearbeitet. +diesem Dokument. -** Titel der Dokumentation +** TODO Titel der Dokumentation + +- Note taken on [2018-01-03 Mit 16:30] \\ + Müssen wir wohl überarbeiten da wir mal angedacht haben das ein + Musikinstrumene-Shop allenfalls einfacher ist. Die Gruppe hat verschiedene Varianten gelistet und sich für die lustigste entschieden. @@ -39,40 +41,236 @@ Dokumentation zu unserer Case Study Webtechnologie 3. Alle Inhalte sind chronologisch sortiert, vom ältesten zum jüngsten Ereigniss, und nach Kapiteln getrennt. -** Über die Autoren +** Lizenz -Dieses Dokument wurde von Ivan Hörler und Andreas Zweili im Auftrag -der IBZ erstellt und darf ohne Einverständniss der Autoren kopiert und -vervielfälltigt werden. Erwähnung der Autoren vorausgesetzt. +Dieses Dokument sowie der dazugehörige Code wurde von Ivan Hörler und +Andreas Zweili im Rahmen einer Arbeit an der IBZ Schule erstellt und +steht unter einer GPLv3\footcite{gplv3} Lizenz. Dadurch darf die +Arbeit kopiert und weiterverarbeitet unter Einhaltung der Regeln der +GPLv3. -* Projektanalyse und Planung +* TODO Projektanalyse und Planung ** Projektziele Der Student erarbeitet in einer Zweiergruppe einen selbstentwickelten Web-Shop. Die einzusezenden Technologien sollen Opensource sein. Die zur verfügungstehende Zeit ist pro Student mit 80h zu veranschlagen. Am Ende dieser Zeitspanne soll ein funktionaler Web-Shop mit minimalem -graphischen Userinterface entstehen, die dazugehörige Dokumentation +graphischen User Interface entstehen, die dazugehörige Dokumentation umfasst alle Aspekte um die gewählte Lösung nachzuvollziehen. +Die Projekt wurden in der Tabelle: ([[tab:projektziele]]) zusätzlich noch +nach Prioritäten gewichtet. -| Nr. | Beschreibung | Priorität | -|-----+--------------------------------------------------------------------+-----------| -| 1. | Das Datenmodel muss korrekt konzipiert sein. | Hoch | -| 2. | Alle Vorgehen müssen in diesem Dokument erläutert werden. | Mittel | -| 3. | Die Arbeitsstunden müssen eingehalten werden. | Tief | -| 4. | Der Shop muss funktionstüchtig sein. | Mittel | -| 5. | Die Applikation muss vor der Übergabe vollständig getestet werden. | Hoch | -| 6. | Problemstellungen müssen ersichtlich dokumentiert werden. | Mittel | #+CAPTION: Projektziele +#+ATTR_LATEX: :align |>{\columncolor[HTML]{EFEFEF}}p{0.8cm}|l|p{1.5cm}| +#+NAME: tab:projektziele +|-------+--------------------------------------------------------------------+-------------| +| *Nr.* | *Beschreibung* | *Priorität* | +|-------+--------------------------------------------------------------------+-------------| +| 1. | Das Datenmodel muss korrekt konzipiert sein. | Hoch | +|-------+--------------------------------------------------------------------+-------------| +| 2. | Alle Vorgehen müssen in diesem Dokument erläutert werden. | Mittel | +|-------+--------------------------------------------------------------------+-------------| +| 3. | Die Arbeitsstunden müssen eingehalten werden. | Tief | +|-------+--------------------------------------------------------------------+-------------| +| 4. | Der Shop muss funktionstüchtig sein. | Mittel | +|-------+--------------------------------------------------------------------+-------------| +| 5. | Die Applikation muss vor der Übergabe vollständig getestet werden. | Hoch | +|-------+--------------------------------------------------------------------+-------------| +| 6. | Problemstellungen müssen ersichtlich dokumentiert werden. | Mittel | +|-------+--------------------------------------------------------------------+-------------| +| 7. | Die Punkte der Bewertung werden erfüllt. | Hoch | +|-------+--------------------------------------------------------------------+-------------| ** Mittel und Methoden *** Werkzeuge -Als Testumgebung wurde eine VM Lösung mit Vagrant gewählt. Diese über -eine MIT-Lizenz frei verfügbare Lösung für Containerautomation eignet -sich durch seine crossplattform Anwendung hervorragend um die -Entwicklung schnellstmöglich ohne lästige Einzelkonfigurationen auf -die Beine zu bringen. Der Hypervisor für Vagrant war dabei Virtualbox. +Während dem Erstellen dieser Arbeit wurde eine Vielzahl an Werkzeugen +eingesetzt. Nachfolgend werden diese Werkzeuge kurz beschrieben sowie +ihre Verwendung begründet. Wir haben dabei darauf geachtet soviel Open +Source Software wie möglich zu verwenden. Nicht nur für den Web-Shop an +sich sondern generell für alle Tasks im Projekt. + +**** Versionkontrolle + +Eine Versionskontrollsoftware erschien uns als notwendig um den Code +auf einfache und zuverlässige Weise untereinander austauschen zu +können. Andere Lösungen wie Dropbox, etc. hätten es uns nicht erlaubt +Konflikte zu vermeinden. + +Als Software für die Versionskontrolle wurde Git \footcite{git} gewählt. +Git wurde aus diversen Gründen gewählt: + +- Ist der de facto Standard bei Versionskontrollsoftware +- Läuft auf allen gängigen Betriebsystemen +- Es gäbe gratis Services die man nutzen könnte (Github, Gitlab) +- Man kann offline arbeiten und Commits erstellen +- Das Team hat bereits einen eigenen Git Server zur Verfügung +- Das Team ist bereits mit Git aus vorhergehenden Projekten vertraut + dadurch muss man keine Ressourcen aufwenden eine neue Software zu lernen. + Zusätzlich hat sich Git in den vorhergehenden Projekten als robuste + und schnelle Software erwiesen. +- Git ist freie Software unter GNU Public License v2. + +**** Entwicklungsumgebung + +Damit beide Studenten auf der gleichen Basis arbeiten haben wir uns +dazu entschieden den Web-Shop in einer virtuellen Maschine zu +entwickeln. Dies führt jedoch in der Regel zum Problem das die +Änderungen in der virtuellen Maschine miteinander abgesprochen und +ausgetauscht werden müssen. Um dieses Problem zu beheben haben wir uns +dazu entschieden Vagrant\footcite{vagrant} zu verwenden. +Vagrant ist freie Software unter der MIT Lizenz. + +Vagrant erlaubt es einem den Zustand einer virtuellen Maschine in +einer Text Datei zu beschreiben und diese dann gemäss der Beschreibung +automatisiert aufzusetzen. Dies hat den Vorteil das die Konfiguration +der virtuellen Maschine auch ohne weiteres mit dem restlichen Code in +der Versionskontrollsoftware gepflegt werden kann. + +Desweiteren hilft das automatisierte Aufsetzen das vermeiden von +menschlichen Fehlern. Somit kann davon ausgegangen werden dass, das +System in der virtuellen Maschine immer den korrekten Stand zum +entwickeln sein. Sollte dies nicht mehr der Fall sein lässt sich die +virtuelle Maschine mit einem maxmimal zwei Befehlen wieder in den +Ursprungszustand zurücksetzen. + +Als Hypervisor der virtuellen Maschine wurde +Virtualbox\footcite{virtualbox} eingesetzt. Virtualbox ist im Kern +freie Software unter der GNU Public License v2. Das unter einer +proprietären Lizenz erhältliche Erweiterungspacket ist für unser Setup +nicht notwendig. + +**** Hostsystem + +Als Hostsystem für unseren Web-Shop haben wir uns für die Linux +Distribution Debian\footcite{debian} in der Version 9 (Stretch) +entschieden. Für Debian haben wir uns vor allem aus folgenden Gründen +entschieden: + +- Stabiles System +- Sehr guter Packetmanager was einem das Scripting vereinfacht. +- Gilt als sehr sicher +- Hat sich in vorhergehenden Projekten bereits als gute Basis bewiesen +- Enthält in der Grundkonfiguration nur freie Software (nicht freie + Software muss aktiv hinzugefügt werden) +- In der Linux Welt sehr verbreitet +- Im Gegensatz zu Ubuntu nicht von einer Firma abhängig + +**** Deployment Software für Produktionsserver + +Auch auf dem produktiven Server haben wir uns für Debian entschieden. +Um diesen aufzusetzen hatten wir in etwa die ähnlichen Anforderungen +wie für die Entwicklungsumgebung. Also einen Weg um das System +möglichst automatisch und reproduzierbar aufzusetzen. Die für die +Entwicklungsumgebung verwendete Software Vagrant ist für produktive +System allerdings eher weniger geeignet. + +Für solche Fälle bietet sich eine Software Namens +"Ansible"\footcite{ansible} an. Diese bietet einem ähnlich wie Vagrant +die Möglichkeit den Zustand eines Systems in Text Dateien zu +beschreiben. Allerdings bietet einem Ansible noch zusätzliche +Möglichkeiten und bietet einem ein standardisiertes Interface um +unterschiedliche Systeme auf die selbe Weise zu konfigurieren. + +Der Vorteil gegenüber anderen System ist vorallem das Ansible mit sehr +wenig Abhängigkeiten für das zu konfigurierende System daherkommt. Auf +einem Linux System ist nur SSH Zugriff und Python notwendig. Einen +Client braucht man nicht zu installieren. +Ansible ist freie Software unter der GNU Public License v3. + +**** Framework + +Um die Entwicklung der Applikation zu vereinfachen haben wir uns dazu +entschlossen ein Framework einzusetzen. Frameworks bringen einem in +der Entwicklung diverse Vorteile. Unter anderem bieten sie Hilfen bei +sich wiederholenden Programmieraufgaben und bieten je nachdem die +Möglichkeit die Applikation in einer einzigen Sprache zu schreiben da +sich das Framework auch um die Datenbank kümmert. In der +Webentwicklung helfen sie einem insbesondere auch dabei +Sicherheitslücken wie Cross Site Scripting und SQL Injections +abzufangen. + +Wir haben uns dabei für das Framework Django\footcite{django} +entschieden. Django ist ein Python basiertest Framework. Django ist +freie Software unter der drei Klausen BSD Lizenz. Wir haben uns aus +folgenden Gründen für ein Python basiertes Framework gegenüber einem +PHP basierten Framework entschieden: + +- Python gilt als die Sprache mit der schöneren Syntax +- Wir wollten im Bezug auf das Programmieren etwas neues ausprobieren + was sich im Rahmen einer Case Study sehr gut machen lässt. Da man + ein "realistisches" Szenarium erhält und dieses in einem relativ + kontrollierten Rahmen ausführen kann. +- Python ist in dem von uns gewählten Hostsystem wie in den meisten + Linux Distributionen bereits integriert. + +**** Webserver + +Als Webserver verwenden wir ganz klassisch Apache\footcite{apache}. +Dies vorallem aus dem Grund das wir Apache aus diversen vorhergehenden +Projekten bereits sehr gut kennen und sich der Webserver dort sehr gut +bewährt hat. Apache wird dabei auch noch gut von Django unterstützt. +Der Apache Webserver ist freie Software unter der Apache License 2.0 +und gehört der gemeinnützigen Organisation "Apache Foundation". + +**** Datenbank + +Bei der Datenbank haben wir uns für MariaDB\footcite{mariadb} +entschieden. Auch hier hauptsächlich weil wir MariaDB bereits aus +vorhergehenden Projekt kennen. MariaDB ist ein Fork von MySQL welcher +gegenüber MySQL rückwärtskompatibel ist. MariaDB ist dabei jedoch viel +Community näher als MySQL und wird dabei auch sehr demokratisch +entwickelt\footcite{mariadbgov}. MariaDB gehört dabei keiner einzelnen +Firma oder Person sonder der gemeinnützigen Organisation "MariaDB +Foundation". Was für zusätzliche Stabilität sorgen sollte. +MariaDB ist freie Software unter GNU Public License v2. + +**** Editoren + +Das Hauptwerkzeug von jedem Entwickler ist sein Text Editor. Dabei +hat jeder meistens seine ganz eigene Präferenzen wenn es um die Wahl +des Editors geht. + +***** Atom + +Ivan hat während der Case Study hauptsächlich mit Atom\footcite{atom} +gearbeitet. Atom wird von Github Inc. entwickelt und ist freie +Software unter der MIT Lizenz. + +***** GNU Emacs + +Andreas arbeitet hauptsächlich mit dem Editor GNU +Emacs\footcite{emacs}. GNU Emacs ist mit 32 Jahren (obwohl seine +Wurzeln bis ins Jahre 1976 zurückgehen) wohl eines der ältesten noch +aktiven Software Projekte. Emacs ist freie Software unter der GNU +Public License v3. + +**** Dokumentation + +Diese Dokumentation wurde in Org-mode\footcite{orgmode} einer +Erweiterung für den Text Editor Emacs geschrieben. Anschliessend wurde +die Dokumentation in LaTeX\footcite{latex} Code konvertiert und +finalisiert. Der Zwischenschritt über Org-mode wurde gewählt weil +Org-mode etwas einfacher zu schreiben ist als reines LaTeX. + +LaTeX ist eine Software welche einem die Benutzung des Textsatzsystems +TeXs vereinfacht. Wir haben LaTeX gegenüber einem "What You See Is +What You Get" Editor gewählt weil es einem mit seiner Markup Sprache +erlaubt das Dokument in Text Dateien zu erstellen. Was wir als +Programmierer sehr angenehm finden. Dadurch das LaTeX auch nur aus +reinen Textdateien besteht kann man die Dokumente auch ohne weiteres +in die Versionskontrollsoftware einchecken und somit auf einfache +Weise zusammen daran arbeiten und die Entwicklung im Log +zurückverfolgen kann. + +Die Grafiken in diesem Dokument wurden hauptächlich mit dem Vektor +Grafik Editor Inkscape\footcite{inkscape} erstellt. Inkscape ist freie +Software unter der GNU Public License v3. + +Die Klassen Diagramme haben wir mit der Django Erweiterung +"Django-Extensions"\footcite{django_extensions} erstellt. +Django-Extensions ist freie Software unter der MIT Lizenz. *** Methoden @@ -107,15 +305,19 @@ Die SWOT-Analyse ist eine Methode, die Stärken, Schwächen, Chancen und Gefahren zu erkennen, indem eine 4-Felder-Matrix ausgefüllt wird. Wichtig vor dem Ausfüllen der SWOT-Analyse ist es, ein klares Ziel zu -haben. +haben. Die ausegfüllte SWOT-Analyse für dieses Projekt ist in der +Tabelle: ([[tab:swot]]) zu sehen. -| Stärken | Schwächen | Chancen | Gefahren | -|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+---------+----------| -| Wir als Programmierer haben ein gutes Know-How im Bereich Datenbanken | Wir als Programmierer haben keine Erfahrung im Konsumsegment unseres Nutzers | | | -|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+---------+----------| -| Die Umsetzung der graphischen Anwendungsoberfläche könnte sich als schwierig erweisen. | Die Umsetzungszeit ist knapp bemessen | | | -|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+---------+----------| #+CAPTION: SWOT-Analyse +#+ATTR_LATEX: :align |p{.22\textwidth}|p{.22\textwidth}|p{.22\textwidth}|p{.22\textwidth}| +#+NAME: tab:swot +|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+------------| +| *Stärken* | *Schwächen* | *Chancen* | *Gefahren* | +|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+------------| +| Wir als Programmierer haben ein gutes Know-How im Bereich Datenbanken | Wir als Programmierer haben keine Erfahrung im Konsumsegment unseres Nutzers | | | +|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+------------| +| Die Umsetzung der graphischen Anwendungsoberfläche könnte sich als schwierig erweisen. | Die Umsetzungszeit ist knapp bemessen | | | +|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+------------| ** Umweltanalyse @@ -124,10 +326,16 @@ Erwartungshaltungen und Einflüsse auf das Projekt durch interne und externe soziale Umwelten zu betrachten und zu bewerten. Auf Grundlage der Analyseergebnisse werden erforderliche Massnahmen zur Gestaltung der Umweltbeziehungen abgeleitet. Die Gestaltung der -Projektumweltbeziehungen ist eine Projektmanagementaufgabe. -In dieser Tabelle wurden die Anforderungen und Wünsche mit -Einschätzung der Wahrscheinlichkeit der Einflussnahme aufgenommen. +Projektumweltbeziehungen ist eine Projektmanagementaufgabe. In dieser +Tabelle: ([[tab:umweltanalyse]]) wurden die Anforderungen und Wünsche +mit Einschätzung der Wahrscheinlichkeit der Einflussnahme aufgenommen. +Zusätzlich ist die Beziehung der Stakeholder zum Projekt noch in der +Abbildung: ([[fig:umweltgrafik]]) grafisch dargestellt. +#+CAPTION: Umwelt-Analyse +#+ATTR_LATEX: :align |>{\columncolor[HTML]{EFEFEF}}p{0.8cm}|l|l|p{8cm}|l| +#+NAME: tab:umweltanalyse +|-----+---------------+----------+-----------------------------------------------+-------------------| | Nr. | Stakeholder | Einfluss | Anforderung/Wünsche | Warscheinlichkeit | |-----+---------------+----------+-----------------------------------------------+-------------------| | 1. | Auftraggeber | hoch | - Innovatives Produkt auf dem Markt anbieten. | hoch | @@ -137,26 +345,25 @@ Einschätzung der Wahrscheinlichkeit der Einflussnahme aufgenommen. | | | | - Schnell anfangen können. | hoch | | | | | - Viele Arbeitsschritte Automatisieren | mittel | |-----+---------------+----------+-----------------------------------------------+-------------------| -| 3. | Nachfrager | gering | - Intuitiv bedienbare Webseite | hoch | +| 3. | Interessenten | gering | - Intuitiv bedienbare Webseite | hoch | | | | | - schnell finden was gesucht wird. | hoch | |-----+---------------+----------+-----------------------------------------------+-------------------| | 4. | Projektleiter | hoch | - Gutes Innovatives Produkt erschaffen. | mittel | | | | | - Anerkennung im fachlichen Umfeld | hoch | -| | | | | | -#+CAPTION: Umwelt-Analyse - -** TODO Umweltgrafik +|-----+---------------+----------+-----------------------------------------------+-------------------| #+CAPTION: Stakeholder Diagramm #+ATTR_LATEX: :width .9\textwidth +#+NAME: fig:umweltgrafik [[file:diagrammes/stakeholder_diagramm.eps]] ** TODO Risikomanagement -*** TODO Risikobeschreibung - -- Note taken on [2017-10-31 Tue 22:09] \\ - Tönt noch sehr nach DB Case Study +*** NEXT Risikobeschreibung +#+CAPTION: Risikobeschreibung +#+ATTR_LATEX: :align |>{\columncolor[HTML]{EFEFEF}}p{0.8cm}|p{5cm}|p{5cm}|p{0.8cm}|p{0.8cm}| +#+NAME: tab:risikobeschreibung +|-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| | Nr. | Beschreibung | Massnahmen | W^1 | A^2 | |-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| | 1. | Die Datenbank ist schlecht modeliert. | Das ERM nach dessen Erstellung gründlich auf Fehler prüfen, falls nötig extern prüfen lassen. | 2 | 3 | @@ -169,25 +376,31 @@ Einschätzung der Wahrscheinlichkeit der Einflussnahme aufgenommen. |-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| | 5. | Die Programmierung des Shops benötigt zuviel Zeit | Beider Projektplanung genau definieren was die GUI Applikation beinhalten muss. Ziele definieren, abgrenzungen treffen. | 3 | 1 | |-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| -#+CAPTION: Risikobeschreibung -*** TODO Risikobewertung +*** NEXT Risikobewertung +#+CAPTION: Risikobewertung Wahrscheinlichkeit +#+ATTR_LATEX: :align l|l +#+NAME: tab:wahrscheinlichkeit | Bewertung | Beschreibung: Warscheinlichkeit (W) | |------------+-------------------------------------| | 1 = gering | Unwarscheinlich, <20% | | 2 = mittel | Mässig warscheinlich, 20-50% | | 3 = hoch | Hohe warscheinlichkeit > 50% | -#+CAPTION: Risikobewertung Wahrscheinlichkeit +#+CAPTION: Risikobewertung Auswirkung +#+ATTR_LATEX: :align l|l +#+NAME: tab:auswirkung | Bewertung | Beschreibung: Auswirkung (A) | |------------+-------------------------------------------------| | 1 = gering | geringe auswirkungen auf das Gesammtergebniss | | 2 = mittel | Arbeitsumstellung oder grösserer Arbeitsaufwand | | 3 = hoch | Projekt erfüllt nicht alle Anforderungen | -#+CAPTION: Risikobewertung Auswirkung ---> Graphik einfügen!!! +#+CAPTION: Grafische Darstellung der Risikoanalyse +#+ATTR_LATEX: :width \textwidth +#+NAME: fig:risk +[[file:diagrammes/risk_analysis.eps]] ** TODO Projektabgrenzung @@ -200,115 +413,217 @@ Am ende des Projekts die nicht lauffähigen teile ausgrenzen. :-) ** Architektur vorbereiten ** Arbeitspakete definieren -* Umsetzung -** Spezifikation -*** Mockup -#+ATTR_LATEX: :width 18cm -#+CAPTION: a early Mockup of the shop -[[file:pictures/mockup-full-snipet.png][file:pictures/mockup-full-snipet.png] -*** Anwendungsfälle -*** Klassendiagramme der Models +* TODO Umsetzung +** TODO Spezifikation +*** TODO User Stories -**** Category +User Stories sind eine in Alltagssprache geschriebenen +Software-Anforderungen. Sie sind bewusst kurzgehalten und beschreiben +die Wünsche und Ziele der Rollen welche die Software verwenden. + +**** NEXT Auftraggeber/Verwaltung + +**** NEXT Kunde + +**** NEXT Interessenten + +*** TODO Use Cases + +Ein Use Case sammelt alle möglichen Szenarien, die eintreten können, +wenn ein Akteur versucht, mit Hilfe des betrachteten Systems ein +bestimmtes Ziel zu erreichen. Dabei beschreibt er was beim Versuch der +Zielerreichung passieren kann. Je nach Ablauf kann auch ein Fehlschlag +ein Ergebnis eines Anwendungsfalls sein (e.g. falsches Pass- wort beim +Login). Dabei wird die technische Lösung nicht konkret beschrieben. +Die Detailstufe kann dabei sehr unterschiedlich sein.\footcite{usecase} + +**** TODO Use Case Diagramm + +"Ein Anwendungsfalldiagramm ... ist eine der 14 Diagrammarten der +Unified Modeling Language (UML), einer Sprache für die Modellierung +der Strukturen und des Verhaltens von Software- und anderen Systemen. +Es stellt Anwendungsfälle und Akteure mit ihren jeweiligen +Abhängigkeiten und Beziehungen dar."\footcite{usecasediagramm} + +**** NEXT Use Case Detailbeschreibung + +#+CAPTION: Use Case +#+ATTR_LATEX: :align |>{\columncolor[HTML]{EFEFEF}}p{.25\textwidth}|p{.7\textwidth}| +#+NAME: tab:login +|-------------------+-----------------------------| +| Identifier + Name | | +|-------------------+-----------------------------| +| Description | | +|-------------------+-----------------------------| +| Actors | | +|-------------------+-----------------------------| +| Status | Freigegeben | +|-------------------+-----------------------------| +| Includes | - | +|-------------------+-----------------------------| +| Trigger | | +|-------------------+-----------------------------| +| Preconditions | | +|-------------------+-----------------------------| +| Postconditions | | +|-------------------+-----------------------------| +| Normal Flow | | +|-------------------+-----------------------------| +| Alternative Flow | - | +|-------------------+-----------------------------| +| Notes | - | +|-------------------+-----------------------------| +| UC History | 1.0 Darft erstellt durch AZ | +|-------------------+-----------------------------| +| Author | A. Zweili & I. | +|-------------------+-----------------------------| +| Date | | +|-------------------+-----------------------------| + +*** NEXT Mockup + +#+CAPTION: Ein frühes Mockup des Shop +#+ATTR_LATEX: :width \textwidth +#+NAME: mockup +[[file:pictures/mockup-full-snipet.png][file:pictures/mockup-full-snipet.png]] + +*** TODO Klassendiagramme der Models +**** NEXT Category #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Kategorien +#+NAME: fig:category [[file:pictures/class_category.png]] -**** Option +**** NEXT Option #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Optionen +#+NAME: fig:option [[file:pictures/class_option.png][file:pictures/class_option.png]] -**** Setting +**** NEXT Setting #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Einstellungen +#+NAME: fig:umweltgrafik [[file:pictures/class_setting.png][file:pictures/class_setting.png]] -**** ArticleStatus +**** NEXT ArticleStatus #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Artikelstatus +#+NAME: fig:articlestatus [[file:pictures/class_articlestatus.png][file:pictures/class_articlestatus.png]] -**** ExchangeRate +**** TODO ExchangeRate #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Wechselkurse +#+NAME: fig:exchangerate [[file:pictures/class_exchangerate.png][file:pictures/class_exchangerate.png]] -**** Article +**** NEXT Article #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Artikel +#+NAME: fig:article [[file:pictures/class_article.png][file:pictures/class_article.png]] -**** OrderStatus +**** NEXT OrderStatus #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Bestellstatus +#+NAME: fig:orderstatus [[file:pictures/class_orderstatus.png][file:pictures/class_orderstatus.png]] -**** OrderOfGoods +**** NEXT OrderOfGoods #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Warenbestellungen +#+NAME: fig:orderofgoods [[file:pictures/class_orderofgoods.png][file:pictures/class_orderofgoods.png]] -**** Picture +**** NEXT Picture #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Bilder +#+NAME: fig:picture [[file:pictures/class_picture.png][file:pictures/class_picture.png]] -**** Order +**** NEXT Order #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Bestellungen +#+NAME: fig:order [[file:pictures/class_order.png][file:pictures/class_order.png]] -**** ShoppingCart +**** NEXT ShoppingCart #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Warenkörbe +#+NAME: fig:shoppingcart [[file:pictures/class_shoppingcart.png][file:pictures/class_shoppingcart.png]] -**** City +**** NEXT City #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Städte +#+NAME: fig:city [[file:pictures/class_city.png][file:pictures/class_city.png]] -**** Salutation +**** NEXT Salutation #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Anreden +#+NAME: fig:salutation [[file:pictures/class_salutation.png][file:pictures/class_salutation.png]] -**** Person +**** NEXT Person #+ATTR_LATEX: :width 9cm #+CAPTION: Klassenmodel für Personen +#+NAME: fig:person [[file:pictures/class_person.png][file:pictures/class_person.png]] -** Datenbank -*** Anforderungsanalyse -*** Relationen Model -*** Relationen Diagramm -*** SQL Create DB -*** SQL Insert Testdaten -*** SQL Restriktionen erarbeiten -*** SQL Views erstellen -*** SQL Prozeduren und Funktionen erarbeiten - ** Benutzerinterface *** Mockup skizzieren *** Frontend Umsetzung *** Backend Umsetzung -*** TODO Testing -**** Test Cases + +** Testfälle + +#+CAPTION: Testfälle +#+ATTR_LATEX: :environment longtable :align |>{\columncolor[HTML]{EFEFEF}}p{1.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}| +#+NAME: tab:testcases +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| Testcase | Objective | Precondition | Steps | Testdata | Expected | Postcondition | Result | +| ID | | | | | Result | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-01 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-02 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-03 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-04 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-05 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-06 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-07 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-08 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-09 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-10 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-11 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| +| TC-12 | | | | | | | | +|----------+-----------+--------------+-------+----------+----------+---------------+--------| * Fazit ** Projektmanagement From ece1bfcc705ae92c755d472fb827124b435b66d5 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:18:03 +0100 Subject: [PATCH 32/53] add the bibliography to the toc --- docs/main.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/main.tex b/docs/main.tex index 0538a4c..fc4d506 100644 --- a/docs/main.tex +++ b/docs/main.tex @@ -33,7 +33,7 @@ aufzeigen kann. \include{doku} \newpage -\printbibliography +\printbibliography[heading=bibintoc] \newpage \microtypesetup{protrusion=false} From 4a09b26f21306b4337543792bb45ff6d33651fba Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:18:16 +0100 Subject: [PATCH 33/53] rename the bibliography to "Referenzen" --- docs/style.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/style.tex b/docs/style.tex index b98c621..5ede682 100644 --- a/docs/style.tex +++ b/docs/style.tex @@ -133,4 +133,7 @@ } \usepackage[citestyle=verbose,bibstyle=numeric,sorting=none,backend=bibtex8]{biblatex} +\DefineBibliographyStrings{german}{% + references = {Referenzen}, +} From 5ada76165d28fff5904d129bebb73dd747d53992 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 5 Jan 2018 15:18:47 +0100 Subject: [PATCH 34/53] use tocbibind for the table of contents --- docs/style.tex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/style.tex b/docs/style.tex index 5ede682..06974f8 100644 --- a/docs/style.tex +++ b/docs/style.tex @@ -131,9 +131,13 @@ listing options={basicstyle=\ttfamily,language=bash}, title=\thetcbcounter #2, #1 } - +\usepackage{tocbibind} \usepackage[citestyle=verbose,bibstyle=numeric,sorting=none,backend=bibtex8]{biblatex} \DefineBibliographyStrings{german}{% references = {Referenzen}, } +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "main" +%%% End: From d125ec9f3d0995fc87c44b83dfa75cd3fea7ad83 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 6 Jan 2018 15:01:17 +0100 Subject: [PATCH 35/53] colapse the tables for better editing --- docs/doku.org | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/docs/doku.org b/docs/doku.org index e8f76fb..f3bf645 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -5,6 +5,7 @@ #+LATEX_CLASS_OPTIONS: [a4paper,11pt] #+LaTeX_HEADER: \input{style} #+OPTIONS: H:5 +#+STARTUP: align * TODO Über dieses Dokument @@ -311,13 +312,14 @@ Tabelle: ([[tab:swot]]) zu sehen. #+CAPTION: SWOT-Analyse #+ATTR_LATEX: :align |p{.22\textwidth}|p{.22\textwidth}|p{.22\textwidth}|p{.22\textwidth}| #+NAME: tab:swot -|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+------------| -| *Stärken* | *Schwächen* | *Chancen* | *Gefahren* | -|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+------------| -| Wir als Programmierer haben ein gutes Know-How im Bereich Datenbanken | Wir als Programmierer haben keine Erfahrung im Konsumsegment unseres Nutzers | | | -|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+------------| -| Die Umsetzung der graphischen Anwendungsoberfläche könnte sich als schwierig erweisen. | Die Umsetzungszeit ist knapp bemessen | | | -|----------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+------------| +|----------------------+----------------------+----------------------+----------------------| +| *Stärken* | *Schwächen* | *Chancen* | *Gefahren* | +| <20> | <20> | <20> | <20> | +|----------------------+----------------------+----------------------+----------------------| +| Wir als Programmierer haben ein gutes Know-How im Bereich Datenbanken | Wir als Programmierer haben keine Erfahrung im Konsumsegment unseres Nutzers | | | +|----------------------+----------------------+----------------------+----------------------| +| Die Umsetzung der graphischen Anwendungsoberfläche könnte sich als schwierig erweisen. | Die Umsetzungszeit ist knapp bemessen | | | +|----------------------+----------------------+----------------------+----------------------| ** Umweltanalyse @@ -363,19 +365,20 @@ Abbildung: ([[fig:umweltgrafik]]) grafisch dargestellt. #+CAPTION: Risikobeschreibung #+ATTR_LATEX: :align |>{\columncolor[HTML]{EFEFEF}}p{0.8cm}|p{5cm}|p{5cm}|p{0.8cm}|p{0.8cm}| #+NAME: tab:risikobeschreibung -|-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| -| Nr. | Beschreibung | Massnahmen | W^1 | A^2 | -|-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| -| 1. | Die Datenbank ist schlecht modeliert. | Das ERM nach dessen Erstellung gründlich auf Fehler prüfen, falls nötig extern prüfen lassen. | 2 | 3 | -|-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| -| 2. | Viel Arbeit an der Arbeitsstelle, dabei bleibt weniger Zeit für die Casestudy. | Die Zeit die einem zur Verfügung steht nutzen und fixe Tage definieren. Projektplanung machen. | 1 | 2 | -|-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| -| 3. | Know-How zur Umsetzung ist nicht vollständig vorhanden. | Gute Informationsbeschaffung im Internet, Mitschülern, Arbeitgeber, Dozenten etc. | 2 | 2 | -|-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| -| 4. | Kommunikation innerhalb des Teams. | Klare Arbeitsaufteilung innerhalb des Teams und alle 2 Wochen Besprechungen über offene Aufgaben oder Problembehandlungen | 1 | 1 | -|-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| -| 5. | Die Programmierung des Shops benötigt zuviel Zeit | Beider Projektplanung genau definieren was die GUI Applikation beinhalten muss. Ziele definieren, abgrenzungen treffen. | 3 | 1 | -|-----+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-----+-----| +|-----+--------------------------------+--------------------------------+-----+-----| +| | <30> | <30> | | | +| Nr. | Beschreibung | Massnahmen | W^1 | A^2 | +|-----+--------------------------------+--------------------------------+-----+-----| +| 1. | Die Datenbank ist schlecht modeliert. | Das ERM nach dessen Erstellung gründlich auf Fehler prüfen, falls nötig extern prüfen lassen. | 2 | 3 | +|-----+--------------------------------+--------------------------------+-----+-----| +| 2. | Viel Arbeit an der Arbeitsstelle, dabei bleibt weniger Zeit für die Casestudy. | Die Zeit die einem zur Verfügung steht nutzen und fixe Tage definieren. Projektplanung machen. | 1 | 2 | +|-----+--------------------------------+--------------------------------+-----+-----| +| 3. | Know-How zur Umsetzung ist nicht vollständig vorhanden. | Gute Informationsbeschaffung im Internet, Mitschülern, Arbeitgeber, Dozenten etc. | 2 | 2 | +|-----+--------------------------------+--------------------------------+-----+-----| +| 4. | Kommunikation innerhalb des Teams. | Klare Arbeitsaufteilung innerhalb des Teams und alle 2 Wochen Besprechungen über offene Aufgaben oder Problembehandlungen | 1 | 1 | +|-----+--------------------------------+--------------------------------+-----+-----| +| 5. | Die Programmierung des Shops benötigt zuviel Zeit | Beider Projektplanung genau definieren was die GUI Applikation beinhalten muss. Ziele definieren, abgrenzungen treffen. | 3 | 1 | +|-----+--------------------------------+--------------------------------+-----+-----| *** NEXT Risikobewertung From 6731922c492a32c7b52457546526414527893628 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 6 Jan 2018 15:01:35 +0100 Subject: [PATCH 36/53] add the version number to the django section --- docs/doku.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/doku.org b/docs/doku.org index f3bf645..f574046 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -206,6 +206,8 @@ PHP basierten Framework entschieden: - Python ist in dem von uns gewählten Hostsystem wie in den meisten Linux Distributionen bereits integriert. +Die verwendete Version war dabei 1.10.7-2 aus dem Debian Stretch Repository. + **** Webserver Als Webserver verwenden wir ganz klassisch Apache\footcite{apache}. From f7cbe84b23d4af9369d868877b9e33ded4e886bf Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 6 Jan 2018 15:02:30 +0100 Subject: [PATCH 37/53] reformat the editor section --- docs/doku.org | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/docs/doku.org b/docs/doku.org index f574046..d8fd9cc 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -235,19 +235,18 @@ Das Hauptwerkzeug von jedem Entwickler ist sein Text Editor. Dabei hat jeder meistens seine ganz eigene Präferenzen wenn es um die Wahl des Editors geht. -***** Atom +- Atom :: Ivan hat während der Case Study hauptsächlich mit + Atom\footcite{atom} gearbeitet. Atom wird von Github Inc. + entwickelt und basiert auf dem Electron Framework welches + seinerseit auf Webtechnologien wie Node.js und Chromium + basiert. Atom ist freie Software unter der MIT Lizenz. -Ivan hat während der Case Study hauptsächlich mit Atom\footcite{atom} -gearbeitet. Atom wird von Github Inc. entwickelt und ist freie -Software unter der MIT Lizenz. - -***** GNU Emacs - -Andreas arbeitet hauptsächlich mit dem Editor GNU -Emacs\footcite{emacs}. GNU Emacs ist mit 32 Jahren (obwohl seine -Wurzeln bis ins Jahre 1976 zurückgehen) wohl eines der ältesten noch -aktiven Software Projekte. Emacs ist freie Software unter der GNU -Public License v3. +- GNU Emacs :: Andreas arbeitet hauptsächlich mit dem Editor GNU + Emacs\footcite{emacs}. GNU Emacs ist mit 32 Jahren + (obwohl seine Wurzeln bis ins Jahre 1976 zurückgehen) + wohl eines der ältesten noch "aktiven" Software + Projekte. Emacs ist freie Software unter der GNU Public + License v3. **** Dokumentation From a68530d35627acfda9e826f06471594a32f4c075 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 6 Jan 2018 15:02:39 +0100 Subject: [PATCH 38/53] add the license to the latex section --- docs/doku.org | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/doku.org b/docs/doku.org index d8fd9cc..4dda737 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -265,6 +265,7 @@ reinen Textdateien besteht kann man die Dokumente auch ohne weiteres in die Versionskontrollsoftware einchecken und somit auf einfache Weise zusammen daran arbeiten und die Entwicklung im Log zurückverfolgen kann. +LaTeX ist freie Software unter der LaTeX Project Public License. Die Grafiken in diesem Dokument wurden hauptächlich mit dem Vektor Grafik Editor Inkscape\footcite{inkscape} erstellt. Inkscape ist freie From 94251f2636c5eb31c190557507884f8fe35adf11 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 6 Jan 2018 15:02:55 +0100 Subject: [PATCH 39/53] add user stories --- docs/doku.org | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/doku.org b/docs/doku.org index 4dda737..d8c1247 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -428,10 +428,48 @@ die Wünsche und Ziele der Rollen welche die Software verwenden. **** NEXT Auftraggeber/Verwaltung +Als Anbieter möchte ich... +- Artikel in Kategorien strukturieren damit Kunden sich orientieren können. +- Bilder zu meinen Artikeln hinzufügen damit sich Kunden das Produkt + anschauen können. +- Artikel aktiv oder versteckt schalten können damit ich Produkte auch + temporär aus dem Verkauf nehmen kann. +- Lagerbestände verwalten können damit ich rechzeitig nachbestellen kann. +- Nachbestellungen von Artikeln erfassen können damit ich weiss was + bestellt wurde. +- eine komplette Liste meiner Artikel einsehen können damit ich einen + Überblick über meine Produkte habe. +- eine Liste aller Bestellungen einsehen können um allenfalls + Anpassungen vornehmen zu können. +- Produkte und Kategorien in einer Admin Seite editieren können um + diese einfach administrieren zu können. + **** NEXT Kunde +Als Kunde möchte ich... +- durch Kategorien zu den Produkten navigieren um diese einfacher zu finden. +- Artikel einem Warenkorb hinzufügen können damit ich ungestört + stöbern kann und erst am Schluss den administrativen Teil erledigen muss. +- meinen Warenkorb anzeigen und editieren können um allenfalls + Korrekturen vornehmen zu können. +- die Artikel in meinem Warenkorb bestellen können. +- vor dem Abschluss des Kaufs eine Zusammenstellung der Bestellung + einsehen um die Richtigkeit der Daten zu überprüfen. +- mich registrieren können damit ich meine Adresse nicht jedes Mal neu + eingeben muss. +- in einem Bereich der Webseite meine Profildaten zur Überprüfung + einsehen können. +- Artikel in meiner bevorzugten Währung kaufen können damit ich die + Preise nicht umrechnen muss. + **** NEXT Interessenten +Als Interessent möchte ich... +- die angebotenen Artikel einsehen können um mir ein Bild über das + Angebot machen zu können. +- die Preise in einer anderen Währung anzeigen können um die + Preise in einer mir bekannten Währung vergleichen zu können. + *** TODO Use Cases Ein Use Case sammelt alle möglichen Szenarien, die eintreten können, From 08ad23edef93a45f36bebb0e0cadc75927c57317 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 6 Jan 2018 15:03:18 +0100 Subject: [PATCH 40/53] remove todo states --- docs/doku.org | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/doku.org b/docs/doku.org index d8c1247..b839bb6 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -420,13 +420,13 @@ Am ende des Projekts die nicht lauffähigen teile ausgrenzen. :-) * TODO Umsetzung ** TODO Spezifikation -*** TODO User Stories +*** User Stories User Stories sind eine in Alltagssprache geschriebenen Software-Anforderungen. Sie sind bewusst kurzgehalten und beschreiben die Wünsche und Ziele der Rollen welche die Software verwenden. -**** NEXT Auftraggeber/Verwaltung +**** Auftraggeber/Verwaltung Als Anbieter möchte ich... - Artikel in Kategorien strukturieren damit Kunden sich orientieren können. @@ -444,7 +444,7 @@ Als Anbieter möchte ich... - Produkte und Kategorien in einer Admin Seite editieren können um diese einfach administrieren zu können. -**** NEXT Kunde +**** Kunde Als Kunde möchte ich... - durch Kategorien zu den Produkten navigieren um diese einfacher zu finden. @@ -462,7 +462,7 @@ Als Kunde möchte ich... - Artikel in meiner bevorzugten Währung kaufen können damit ich die Preise nicht umrechnen muss. -**** NEXT Interessenten +**** Interessenten Als Interessent möchte ich... - die angebotenen Artikel einsehen können um mir ein Bild über das From f809765bb2d32d78d8d1e0c2e0eaf287b783f3d7 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 6 Jan 2018 15:53:04 +0100 Subject: [PATCH 41/53] rename "Nutzer" zu "Kunden" --- docs/diagrammes/stakeholder_diagramm.eps | 158 ++++++++++++----------- docs/diagrammes/stakeholder_diagramm.svg | 16 +-- docs/doku.org | 4 +- 3 files changed, 91 insertions(+), 87 deletions(-) diff --git a/docs/diagrammes/stakeholder_diagramm.eps b/docs/diagrammes/stakeholder_diagramm.eps index 20a4436..3e0a10b 100644 --- a/docs/diagrammes/stakeholder_diagramm.eps +++ b/docs/diagrammes/stakeholder_diagramm.eps @@ -1,6 +1,6 @@ %!PS-Adobe-3.0 EPSF-3.0 %%Creator: cairo 1.14.10 (http://cairographics.org) -%%CreationDate: Wed Jan 3 15:10:48 2018 +%%CreationDate: Sat Jan 6 15:46:46 2018 %%Pages: 1 %%DocumentData: Clean7Bit %%LanguageLevel: 2 @@ -77,9 +77,9 @@ Encoding 65 /A put Encoding 66 /B put Encoding 69 /E put Encoding 73 /I put +Encoding 75 /K put Encoding 76 /L put Encoding 77 /M put -Encoding 78 /N put Encoding 80 /P put Encoding 85 /U put Encoding 87 /W put @@ -137,13 +137,13 @@ Encoding 196 /Adieresis put /M 29 def /L 30 def /A 31 def -/N 32 def +/K 32 def end readonly def /sfnts [ -<0001000000090080000300106376742000691d39000015f4000001fe6670676d7134766a0000 -17f4000000ab676c7966134472590000009c00001558686561640d1447cc000018a000000036 -686865610d9f078f000018d800000024686d74789a140e5f000018fc000000886c6f63610001 -675c000019840000008c6d617870048f067100001a1000000020707265703b07f10000001a30 +<0001000000090080000300106376742000691d3900001674000001fe6670676d7134766a0000 +1874000000ab676c7966766f6fce0000009c000015d8686561640d1447cc0000192000000036 +686865610d9f078f0000195800000024686d747899570e5f0000197c000000886c6f63610001 +685c00001a040000008c6d617870048f067100001a9000000020707265703b07f10000001ab0 0000056800020066fe96046605a400030007001a400c04fb0006fb0108057f0204002fc4d4ec 310010d4ecd4ec301311211125211121660400fc73031bfce5fe96070ef8f2720629000200c9 0000048d05d500080013003a40180195100095098112100a0802040005190d3f11001c090414 @@ -278,81 +278,85 @@ e900000100c90000061f05d5000c00bf403403110708070211010208080702110302090a0901 200c01015d40420f010f020f070f080f005800760070008c0009070108020603090416011902 56015802500c67016802780176027c0372047707780887018802800c980299039604175d005d 090121013301230321032302bcfeee0225fe7be50239d288fd5f88d5050efd1903aefa2b017f -fe810000000100c90000053305d500090079401e071101020102110607064207020300af0805 -060107021c0436071c00040a10fcecfcec11393931002f3cec323939304b5358071004ed0710 -04ed5922b21f0b01015d40303602380748024707690266078002070601090615011a06460149 -065701580665016906790685018a0695019a069f0b105d005d13210111331121011123c90110 -0296c4fef0fd6ac405d5fb1f04e1fa2b04e1fb1f0002fcd7050eff2905d90003000700a5400d -0400ce0602080164000564040810d4fcdcec310010d43cec3230004bb00e544bb011545b58bd -00080040000100080008ffc03811373859014bb00e544bb00d545b4bb017545b58bd0008ffc0 -00010008000800403811373859014bb011544bb019545b58bd00080040000100080008ffc038 -11373859004bb0185458bd0008ffc00001000800080040381137385940116001600260056006 -700170027005700608015d0133152325331523fe5ecbcbfe79cbcb05d9cbcbcb0000013500b8 -00cb00cb00c100aa009c01a600b800660000007100cb00a002b20085007500b800c301cb0189 -022d00cb00a600f000d300aa008700cb03aa0400014a003300cb000000d9050200f4015400b4 -009c01390114013907060400044e04b4045204b804e704cd0037047304cd04600473013303a2 -055605a60556053903c5021200c9001f00b801df007300ba03e9033303bc0444040e00df03cd -03aa00e503aa0404000000cb008f00a4007b00b80014016f007f027b0252008f00c705cd009a -009a006f00cb00cd019e01d300f000ba018300d5009803040248009e01d500c100cb00f60083 -0354027f00000333026600d300c700a400cd008f009a0073040005d5010a00fe022b00a400b4 -009c00000062009c0000001d032d05d505d505d505f0007f007b005400a406b80614072301d3 -00b800cb00a601c301ec069300a000d3035c037103db0185042304a80448008f013901140139 -0360008f05d5019a0614072306660179046004600460047b009c00000277046001aa00e90460 -0762007b00c5007f027b000000b4025205cd006600bc00660077061000cd013b01850389008f -007b0000001d00cd074a042f009c009c0000077d006f0000006f0335006a006f007b00ae00b2 -002d0396008f027b00f600830354063705f6008f009c04e10266008f018d02f600cd03440029 -006604ee00730000140000960000b707060504030201002c2010b002254964b040515820c859 -212d2cb002254964b040515820c859212d2c20100720b00050b00d7920b8ffff5058041b0559 -b0051cb0032508b0042523e120b00050b00d7920b8ffff5058041b0559b0051cb0032508e12d -2c4b505820b0fd454459212d2cb002254560442d2c4b5358b00225b0022545445921212d2c45 -442d2cb00225b0022549b00525b005254960b0206368208a108a233a8a10653a2d0000010000 -00025eb80a4d73005f0f3cf5001f080000000000d3d94ef700000000d3d94ef7f7d6fc4c0e59 -09dc00000008000000010000000000010000076dfe1d00000efef7d6fa510e59000100000000 -00000000000000000000002204cd006604d300c9034a00ba04e500710239ffdb04ec007104a2 -00ba03230037051200ba04e7007b051200ba042b006f028b000005db00b207cb00ba02d1002f -023900c10514007105790010051200ae025c00c907e90044051400ba051400ba050e00c90514 -0071057d00c904330058023900c106e700c9047500c90579001005fc00c90000fcd700000000 -00000044000000c400000134000001d8000002540000032800000418000004940000050c0000 -0638000006b000000810000008100000089400000958000009f000000a2c00000ac400000af4 -00000b7800000bc000000d7c00000e1400000eb400000f1400000fdc0000108c000011580000 -11a8000012a4000012e8000013e40000148c000015580001000000220354002b0068000c0002 -00100099000800000415021600080004b8028040fffbfe03fa1403f92503f83203f79603f60e -03f5fe03f4fe03f32503f20e03f19603f02503ef8a4105effe03ee9603ed9603ecfa03ebfa03 -eafe03e93a03e84203e7fe03e63203e5e45305e59603e48a4105e45303e3e22f05e3fa03e22f -03e1fe03e0fe03df3203de1403dd9603dcfe03db1203da7d03d9bb03d8fe03d68a4105d67d03 -d5d44705d57d03d44703d3d21b05d3fe03d21b03d1fe03d0fe03cffe03cefe03cd9603cccb1e -05ccfe03cb1e03ca3203c9fe03c6851105c61c03c51603c4fe03c3fe03c2fe03c1fe03c0fe03 -bffe03befe03bdfe03bcfe03bbfe03ba1103b9862505b9fe03b8b7bb05b8fe03b7b65d05b7bb -03b78004b6b52505b65d40ff03b64004b52503b4fe03b39603b2fe03b1fe03b0fe03affe03ae -6403ad0e03acab2505ac6403abaa1205ab2503aa1203a98a4105a9fa03a8fe03a7fe03a6fe03 -a51203a4fe03a3a20e05a33203a20e03a16403a08a4105a096039ffe039e9d0c059efe039d0c -039c9b19059c64039b9a10059b19039a1003990a0398fe0397960d0597fe03960d03958a4105 -95960394930e05942803930e0392fa039190bb0591fe03908f5d0590bb039080048f8e25058f -5d038f40048e25038dfe038c8b2e058cfe038b2e038a8625058a410389880b05891403880b03 -878625058764038685110586250385110384fe038382110583fe0382110381fe0380fe037ffe -0340ff7e7d7d057efe037d7d037c64037b5415057b25037afe0379fe03780e03770c03760a03 -75fe0374fa0373fa0372fa0371fa0370fe036ffe036efe036c21036bfe036a1142056a530369 -fe03687d036711420566fe0365fe0364fe0363fe0362fe03613a0360fa035e0c035dfe035bfe -035afe0359580a0559fa03580a035716190557320356fe035554150555420354150353011005 -531803521403514a130551fe03500b034ffe034e4d10054efe034d10034cfe034b4a13054bfe -034a4910054a1303491d0d05491003480d0347fe0346960345960344fe0343022d0543fa0342 -bb03414b0340fe033ffe033e3d12053e14033d3c0f053d12033c3b0d053c40ff0f033b0d033a -fe0339fe033837140538fa033736100537140336350b05361003350b03341e03330d0332310b -0532fe03310b03302f0b05300d032f0b032e2d09052e10032d09032c32032b2a25052b64032a -2912052a25032912032827250528410327250326250b05260f03250b0324fe0323fe03220f03 -210110052112032064031ffa031e1d0d051e64031d0d031c1142051cfe031bfa031a42031911 -420519fe031864031716190517fe031601100516190315fe0314fe0313fe031211420512fe03 -11022d05114203107d030f64030efe030d0c16050dfe030c0110050c16030bfe030a100309fe -0308022d0508fe030714030664030401100504fe03401503022d0503fe0302011005022d0301 -100300fe0301b80164858d012b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +fe810000000100c90000056a05d5000a00ef4028081105060507110606050311040504021105 +050442080502030300af09060501040608011c00040b10fcec32d4c4113931002f3cec321739 +304b5358071004ed071005ed071005ed071004ed5922b2080301015d40921402010402090816 +02280528083702360534084702460543085502670276027705830288058f0894029b08e70215 +0603090509061b031907050a030a07180328052b062a073604360536063507300c4103400445 +0540064007400c62036004680567077705700c8b038b058e068f078f0c9a039d069d07b603b5 +07c503c507d703d607e803e904e805ea06f703f805f9062c5d71005d71133311012109012101 +1123c9ca029e0104fd1b031afef6fd33ca05d5fd890277fd48fce302cffd310000000002fcd7 +050eff2905d90003000700a5400d0400ce0602080164000564040810d4fcdcec310010d43cec +3230004bb00e544bb011545b58bd00080040000100080008ffc03811373859014bb00e544bb0 +0d545b4bb017545b58bd0008ffc000010008000800403811373859014bb011544bb019545b58 +bd00080040000100080008ffc03811373859004bb0185458bd0008ffc0000100080008004038 +1137385940116001600260056006700170027005700608015d0133152325331523fe5ecbcbfe +79cbcb05d9cbcbcb0000013500b800cb00cb00c100aa009c01a600b800660000007100cb00a0 +02b20085007500b800c301cb0189022d00cb00a600f000d300aa008700cb03aa0400014a0033 +00cb000000d9050200f4015400b4009c01390114013907060400044e04b4045204b804e704cd +0037047304cd04600473013303a2055605a60556053903c5021200c9001f00b801df007300ba +03e9033303bc0444040e00df03cd03aa00e503aa0404000000cb008f00a4007b00b80014016f +007f027b0252008f00c705cd009a009a006f00cb00cd019e01d300f000ba018300d500980304 +0248009e01d500c100cb00f600830354027f00000333026600d300c700a400cd008f009a0073 +040005d5010a00fe022b00a400b4009c00000062009c0000001d032d05d505d505d505f0007f +007b005400a406b80614072301d300b800cb00a601c301ec069300a000d3035c037103db0185 +042304a80448008f0139011401390360008f05d5019a0614072306660179046004600460047b +009c00000277046001aa00e904600762007b00c5007f027b000000b4025205cd006600bc0066 +0077061000cd013b01850389008f007b0000001d00cd074a042f009c009c0000077d006f0000 +006f0335006a006f007b00ae00b2002d0396008f027b00f600830354063705f6008f009c04e1 +0266008f018d02f600cd03440029006604ee00730000140000960000b707060504030201002c +2010b002254964b040515820c859212d2cb002254964b040515820c859212d2c20100720b000 +50b00d7920b8ffff5058041b0559b0051cb0032508b0042523e120b00050b00d7920b8ffff50 +58041b0559b0051cb0032508e12d2c4b505820b0fd454459212d2cb002254560442d2c4b5358 +b00225b0022545445921212d2c45442d2cb00225b0022549b00525b005254960b0206368208a +108a233a8a10653a2d000001000000025eb8457171965f0f3cf5001f080000000000d3d94ef7 +00000000d3d94ef7f7d6fc4c0e5909dc00000008000000010000000000010000076dfe1d0000 +0efef7d6fa510e5900010000000000000000000000000000002204cd006604d300c9034a00ba +04e500710239ffdb04ec007104a200ba03230037051200ba04e7007b051200ba042b006f028b +000005db00b207cb00ba02d1002f023900c10514007105790010051200ae025c00c907e90044 +051400ba051400ba050e00c905140071057d00c904330058023900c106e700c9047500c90579 +0010053f00c90000fcd70000000000000044000000c400000134000001d80000025400000328 +00000418000004940000050c00000638000006b0000008100000081000000894000009580000 +09f000000a2c00000ac400000af400000b7800000bc000000d7c00000e1400000eb400000f14 +00000fdc0000108c00001158000011a8000012a4000012e8000013e40000150c000015d80001 +000000220354002b0068000c000200100099000800000415021600080004b8028040fffbfe03 +fa1403f92503f83203f79603f60e03f5fe03f4fe03f32503f20e03f19603f02503ef8a4105ef +fe03ee9603ed9603ecfa03ebfa03eafe03e93a03e84203e7fe03e63203e5e45305e59603e48a +4105e45303e3e22f05e3fa03e22f03e1fe03e0fe03df3203de1403dd9603dcfe03db1203da7d +03d9bb03d8fe03d68a4105d67d03d5d44705d57d03d44703d3d21b05d3fe03d21b03d1fe03d0 +fe03cffe03cefe03cd9603cccb1e05ccfe03cb1e03ca3203c9fe03c6851105c61c03c51603c4 +fe03c3fe03c2fe03c1fe03c0fe03bffe03befe03bdfe03bcfe03bbfe03ba1103b9862505b9fe +03b8b7bb05b8fe03b7b65d05b7bb03b78004b6b52505b65d40ff03b64004b52503b4fe03b396 +03b2fe03b1fe03b0fe03affe03ae6403ad0e03acab2505ac6403abaa1205ab2503aa1203a98a +4105a9fa03a8fe03a7fe03a6fe03a51203a4fe03a3a20e05a33203a20e03a16403a08a4105a0 +96039ffe039e9d0c059efe039d0c039c9b19059c64039b9a10059b19039a1003990a0398fe03 +97960d0597fe03960d03958a410595960394930e05942803930e0392fa039190bb0591fe0390 +8f5d0590bb039080048f8e25058f5d038f40048e25038dfe038c8b2e058cfe038b2e038a8625 +058a410389880b05891403880b03878625058764038685110586250385110384fe0383821105 +83fe0382110381fe0380fe037ffe0340ff7e7d7d057efe037d7d037c64037b5415057b25037a +fe0379fe03780e03770c03760a0375fe0374fa0373fa0372fa0371fa0370fe036ffe036efe03 +6c21036bfe036a1142056a530369fe03687d036711420566fe0365fe0364fe0363fe0362fe03 +613a0360fa035e0c035dfe035bfe035afe0359580a0559fa03580a035716190557320356fe03 +5554150555420354150353011005531803521403514a130551fe03500b034ffe034e4d10054e +fe034d10034cfe034b4a13054bfe034a4910054a1303491d0d05491003480d0347fe03469603 +45960344fe0343022d0543fa0342bb03414b0340fe033ffe033e3d12053e14033d3c0f053d12 +033c3b0d053c40ff0f033b0d033afe0339fe033837140538fa033736100537140336350b0536 +1003350b03341e03330d0332310b0532fe03310b03302f0b05300d032f0b032e2d09052e1003 +2d09032c32032b2a25052b64032a2912052a25032912032827250528410327250326250b0526 +0f03250b0324fe0323fe03220f03210110052112032064031ffa031e1d0d051e64031d0d031c +1142051cfe031bfa031a42031911420519fe031864031716190517fe031601100516190315fe +0314fe0313fe031211420512fe0311022d05114203107d030f64030efe030d0c16050dfe030c +0110050c16030bfe030a100309fe0308022d0508fe030714030664030401100504fe03401503 +022d0503fe0302011005022d0301100300fe0301b80164858d012b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b -2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b002b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b002b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b -2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b1d00> +2b2b2b2b2b2b2b1d00> ] def /f-0-0 currentdict end definefont pop %%EndResource @@ -627,7 +631,7 @@ q 1 0 0 -1 0 438.271881 cm BT 16.303735 0 0 16.303735 120.260221 137.471357 Tm /f-0-0 1 Tf -[(Nutzer)]TJ +[(K)48(unden)]TJ ET Q Q showpage diff --git a/docs/diagrammes/stakeholder_diagramm.svg b/docs/diagrammes/stakeholder_diagramm.svg index d59562a..8b40906 100644 --- a/docs/diagrammes/stakeholder_diagramm.svg +++ b/docs/diagrammes/stakeholder_diagramm.svg @@ -272,16 +272,16 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.7" - inkscape:cx="528.66972" - inkscape:cy="299.0207" + inkscape:zoom="1.979899" + inkscape:cx="252.30843" + inkscape:cy="314.53949" inkscape:document-units="mm" inkscape:current-layer="layer4" showgrid="false" inkscape:window-width="1920" - inkscape:window-height="1035" - inkscape:window-x="1680" - inkscape:window-y="45" + inkscape:window-height="1034" + inkscape:window-x="0" + inkscape:window-y="46" inkscape:window-maximized="0" fit-margin-top="0" fit-margin-left="0" @@ -295,7 +295,7 @@ image/svg+xml - + @@ -625,7 +625,7 @@ y="159.90079" x="61.668552" id="tspan5047" - sodipodi:role="line">Nutzer + sodipodi:role="line">Kunden diff --git a/docs/doku.org b/docs/doku.org index b839bb6..d8fe93a 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -4,7 +4,7 @@ #+LaTeX_CLASS: article #+LATEX_CLASS_OPTIONS: [a4paper,11pt] #+LaTeX_HEADER: \input{style} -#+OPTIONS: H:5 +#+OPTIONS: H:5 todo:t #+STARTUP: align @@ -345,7 +345,7 @@ Abbildung: ([[fig:umweltgrafik]]) grafisch dargestellt. | 1. | Auftraggeber | hoch | - Innovatives Produkt auf dem Markt anbieten. | hoch | | | | | - Einhaltung von Terminen und Qualität. | hoch | |-----+---------------+----------+-----------------------------------------------+-------------------| -| 2. | Nutzer | gering | - Einfache Lösung die anpassungsfähig ist. | hoch | +| 2. | Kunden | gering | - Einfache Lösung die anpassungsfähig ist. | hoch | | | | | - Schnell anfangen können. | hoch | | | | | - Viele Arbeitsschritte Automatisieren | mittel | |-----+---------------+----------+-----------------------------------------------+-------------------| From d7202623cd3a926dc5973151cbcd0c5eb67c6bfa Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 7 Jan 2018 11:01:25 +0100 Subject: [PATCH 42/53] add a use case diagramm --- docs/doku.org | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/doku.org b/docs/doku.org index d8fe93a..d557335 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -488,6 +488,11 @@ der Strukturen und des Verhaltens von Software- und anderen Systemen. Es stellt Anwendungsfälle und Akteure mit ihren jeweiligen Abhängigkeiten und Beziehungen dar."\footcite{usecasediagramm} +#+CAPTION: Anwendungsfalldiagramm +#+ATTR_LATEX: :width .9\textwidth +#+NAME: fig:usecase +[[file:diagrammes/use_case.esp]] + **** NEXT Use Case Detailbeschreibung #+CAPTION: Use Case From 7d1e0cf7a6c5ca960844b2101fe613eb9b9771c5 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 7 Jan 2018 18:52:26 +0100 Subject: [PATCH 43/53] add the files for the use case diagramm --- docs/diagrammes/use_case.eps | 649 +++++++++++++++++++++++++++++++++++ docs/diagrammes/use_case.svg | 608 ++++++++++++++++++++++++++++++++ 2 files changed, 1257 insertions(+) create mode 100644 docs/diagrammes/use_case.eps create mode 100644 docs/diagrammes/use_case.svg diff --git a/docs/diagrammes/use_case.eps b/docs/diagrammes/use_case.eps new file mode 100644 index 0000000..6a1f9ae --- /dev/null +++ b/docs/diagrammes/use_case.eps @@ -0,0 +1,649 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: cairo 1.14.10 (http://cairographics.org) +%%CreationDate: Sun Jan 7 18:45:56 2018 +%%Pages: 1 +%%DocumentData: Clean7Bit +%%LanguageLevel: 2 +%%BoundingBox: 39 29 799 563 +%%EndComments +%%BeginProlog +save +50 dict begin +/q { gsave } bind def +/Q { grestore } bind def +/cm { 6 array astore concat } bind def +/w { setlinewidth } bind def +/J { setlinecap } bind def +/j { setlinejoin } bind def +/M { setmiterlimit } bind def +/d { setdash } bind def +/m { moveto } bind def +/l { lineto } bind def +/c { curveto } bind def +/h { closepath } bind def +/re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto + 0 exch rlineto 0 rlineto closepath } bind def +/S { stroke } bind def +/f { fill } bind def +/f* { eofill } bind def +/n { newpath } bind def +/W { clip } bind def +/W* { eoclip } bind def +/BT { } bind def +/ET { } bind def +/pdfmark where { pop globaldict /?pdfmark /exec load put } + { globaldict begin /?pdfmark /pop load def /pdfmark + /cleartomark load def end } ifelse +/BDC { mark 3 1 roll /BDC pdfmark } bind def +/EMC { mark /EMC pdfmark } bind def +/cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def +/Tj { show currentpoint cairo_store_point } bind def +/TJ { + { + dup + type /stringtype eq + { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse + } forall + currentpoint cairo_store_point +} bind def +/cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore + cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def +/Tf { pop /cairo_font exch def /cairo_font_matrix where + { pop cairo_selectfont } if } bind def +/Td { matrix translate cairo_font_matrix matrix concatmatrix dup + /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point + /cairo_font where { pop cairo_selectfont } if } bind def +/Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def + cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def +/g { setgray } bind def +/rg { setrgbcolor } bind def +/d1 { setcachedevice } bind def +/cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def +/cairo_image { image cairo_flush_ascii85_file } def +/cairo_imagemask { imagemask cairo_flush_ascii85_file } def +%%EndProlog +%%BeginSetup +%%BeginResource: font DejaVuSans +11 dict begin +/FontType 42 def +/FontName /DejaVuSans def +/PaintType 0 def +/FontMatrix [ 1 0 0 1 0 0 ] def +/FontBBox [ 0 0 0 0 ] def +/Encoding 256 array def +0 1 255 { Encoding exch /.notdef put } for +Encoding 32 /space put +Encoding 58 /colon put +Encoding 65 /A put +Encoding 67 /C put +Encoding 69 /E put +Encoding 73 /I put +Encoding 75 /K put +Encoding 76 /L put +Encoding 82 /R put +Encoding 85 /U put +Encoding 86 /V put +Encoding 87 /W put +Encoding 97 /a put +Encoding 98 /b put +Encoding 99 /c put +Encoding 100 /d put +Encoding 101 /e put +Encoding 102 /f put +Encoding 103 /g put +Encoding 104 /h put +Encoding 105 /i put +Encoding 107 /k put +Encoding 108 /l put +Encoding 110 /n put +Encoding 111 /o put +Encoding 114 /r put +Encoding 115 /s put +Encoding 116 /t put +Encoding 117 /u put +Encoding 118 /v put +Encoding 119 /w put +Encoding 120 /x put +Encoding 246 /odieresis put +/CharStrings 34 dict dup begin +/.notdef 0 def +/K 1 def +/u 2 def +/n 3 def +/d 4 def +/e 5 def +/I 6 def +/t 7 def +/r 8 def +/s 9 def +/V 10 def +/w 11 def +/a 12 def +/l 13 def +/g 14 def +/A 15 def +/i 16 def +/k 17 def +/c 18 def +/h 19 def +/odieresis 20 def +/b 21 def +/space 22 def +/v 23 def +/U 24 def +/R 25 def +/o 26 def +/L 27 def +/C 28 def +/W 29 def +/E 30 def +/x 31 def +/colon 32 def +/f 33 def +end readonly def +/sfnts [ +<0001000000090080000300106376742000691d39000019b4000001fe6670676d7134766a0000 +1bb4000000ab676c79661d178e5d0000009c00001918686561640d1447cc00001c6000000036 +686865610d9f079000001c9800000024686d74789ff8123900001cbc0000008c6c6f63610001 +c11800001d48000000906d6178700490067100001dd800000020707265703b07f10000001df8 +0000056800020066fe96046605a400030007001a400c04fb0006fb0108057f0204002fc4d4ec +310010d4ecd4ec301311211125211121660400fc73031bfce5fe96070ef8f2720629000100c9 +0000056a05d5000a00ef40280811050605071106060503110405040211050504420805020303 +00af09060501040608011c00040b10fcec32d4c4113931002f3cec321739304b5358071004ed +071005ed071005ed071004ed5922b2080301015d409214020104020908160228052808370236 +0534084702460543085502670276027705830288058f0894029b08e702150603090509061b03 +1907050a030a07180328052b062a073604360536063507300c41034004450540064007400c62 +036004680567077705700c8b038b058e068f078f0c9a039d069d07b603b507c503c507d703d6 +07e803e904e805ea06f703f805f9062c5d71005d711333110121090121011123c9ca029e0104 +fd1b031afef6fd33ca05d5fd890277fd48fce302cffd31000000000200aeffe30458047b0013 +0014003b401c030900030e0106870e118c0a01bc14b80c0d0908140b4e020800461510fcecf4 +39ec3231002fe4e432f4c4ec1112173930b46f15c01502015d13113311141633323635113311 +23350e0123222601aeb87c7c95adb8b843b175c1c801cf01ba02a6fd619f9fbea4027bfba0ac +6663f003a800000100ba00000464047b001300364019030900030e0106870e11b80cbc0a0102 +08004e0d09080b461410fcec32f4ec31002f3ce4f4c4ec1112173930b46015cf1502015d0111 +231134262322061511231133153e013332160464b87c7c95acb9b942b375c1c602a4fd5c029e +9f9ebea4fd870460ae6564ef00020071ffe3045a06140010001c003840191ab9000e14b90508 +8c0eb801970317040008024711120b451d10fcecf4ec323231002fece4f4c4ec10c4ee30b660 +1e801ea01e03015d0111331123350e0123220211100033321601141633323635342623220603 +a2b8b83ab17ccbff00ffcb7cb1fdc7a79292a8a89292a703b6025ef9eca86461014401080108 +014461fe15cbe7e7cbcbe7e700020071ffe3047f047b0014001b007040240015010986088805 +15a90105b90c01bb18b912b80c8c1c1b1502081508004b02120f451c10fcecf4ecc411123931 +0010e4f4ece410ee10ee10f4ee1112393040293f1d701da01dd01df01d053f003f013f023f15 +3f1b052c072f082f092c0a6f006f016f026f156f1b095d71015d0115211e0133323637150e01 +232000111000333200072e0123220607047ffcb20ccdb76ac76263d06bfef4fec70129fce201 +07b802a5889ab90e025e5abec73434ae2a2c0138010a01130143feddc497b4ae9e00000100c9 +0000019305d50003002eb700af02011c00040410fc4bb0105458b9000000403859ec31002fec +3001400d30054005500560058f059f05065d13331123c9caca05d5fa2b0000010037000002f2 +059e0013003840190e05080f03a9001101bc08870a0b08090204000810120e461410fc3cc4fc +3cc432393931002fecf43cc4ec3211393930b2af1501015d01112115211114163b0115232226 +3511233533110177017bfe854b73bdbdd5a28787059efec28ffda0894e9a9fd202608f013e00 +0000000100ba0000034a047b001100304014060b0700110b03870eb809bc070a060800084612 +10fcc4ec3231002fe4f4ecc4d4cc11123930b450139f1302015d012e01232206151123113315 +3e0133321617034a1f492c9ca7b9b93aba85132e1c03b41211cbbefdb20460ae666305050000 +0001006fffe303c7047b002700e7403c0d0c020e0b531f1e080902070a531f1f1e420a0b1e1f +041500860189041486158918b91104b925b8118c281e0a0b1f1b0700521b080e070814224528 +10fcc4ecd4ece4111239393939310010e4f4ec10fef5ee10f5ee121739304b535807100eed11 +1739070eed1117395922b2002701015d406d1c0a1c0b1c0c2e092c0a2c0b2c0c3b093b0a3b0b +3b0c0b200020012402280a280b2a132f142f152a16281e281f292029212427860a860b860c86 +0d12000000010202060a060b030c030d030e030f03100319031a031b031c041d09272f293f29 +5f297f2980299029a029f029185d005d7101152e012322061514161f011e0115140623222627 +351e013332363534262f012e01353436333216038b4ea85a898962943fc4a5f7d85ac36c66c6 +61828c65ab40ab98e0ce66b4043fae282854544049210e2a99899cb62323be353559514b5025 +0f2495829eac1e000000000100100000056805d5000600b74027041105060503110203060605 +03110403000100021101010042030401af0006040302000505010710d4c4173931002fec3239 +304b5358071005ed071008ed071008ed071005ed5922b2500801015d406200032a0347044705 +5a037d038303070600070208040906150114021a041a052a0026012602290429052506200838 +00330133023c043c053706480045014502490449054706590056066602690469057a00760176 +02790479057506800898009706295d005d21013309013301024afdc6d301d901dad2fdc705d5 +fb1704e9fa2b00010056000006350460000c01eb404905550605090a0904550a0903550a0b0a +025501020b0b0a061107080705110405080807021103020c000c011100000c420a0502030603 +00bf0b080c0b0a09080605040302010b07000d10d44bb00a544bb011545b4bb012545b4bb013 +545b4bb00b545b58b9000000403859014bb00c544bb00d545b4bb010545b58b90000ffc03859 +cc173931002f3cec32321739304b5358071005ed071008ed071008ed071005ed071008ed0710 +05ed0705ed071008ed59220140ff050216021605220a350a49024905460a400a5b025b05550a +500a6e026e05660a79027f0279057f05870299029805940abc02bc05ce02c703cf051d050209 +0306040b050a080b09040b050c1502190316041a051b081b09140b150c250025012302270321 +0425052206220725082709240a210b230c390336043608390c300e4602480346044004420540 +06400740084409440a440b400e400e560056015602500451055206520750085309540a550b63 +00640165026a0365046a056a066a076e09610b670c6f0e7500750179027d0378047d057a067f +067a077f07780879097f097b0a760b7d0c870288058f0e97009701940293039c049b05980698 +079908402f960c9f0ea600a601a402a403ab04ab05a906a907ab08a40caf0eb502b103bd04bb +05b809bf0ec402c303cc04ca05795d005d13331b01331b013301230b012356b8e6e5d9e6e5b8 +fedbd9f1f2d90460fc96036afc96036afba00396fc6a0002007bffe3042d047b000a002500bc +4027191f0b17090e00a91706b90e1120861fba1cb923b8118c170c001703180d09080b1f0308 +14452610fcecccd4ec323211393931002fc4e4f4fcf4ec10c6ee10ee11391139123930406e30 +1d301e301f3020302130223f27401d401e401f402040214022501d501e501f50205021502250 +277027851d871e871f8720872185229027a027f0271e301e301f30203021401e401f40204021 +501e501f50205021601e601f60206021701e701f70207021801e801f80208021185d015d0122 +061514163332363d01371123350e01232226353436332135342623220607353e0133321602be +dfac816f99b9b8b83fbc88accbfdfb0102a79760b65465be5af3f00233667b6273d9b4294cfd +81aa6661c1a2bdc0127f8b2e2eaa2727fc00000100c100000179061400030022b70097020108 +00460410fcec31002fec30400d10054005500560057005f00506015d13331123c1b8b80614f9 +ec0000020071fe56045a047b000b0028004a4023190c1d0912861316b90f03b92623b827bc09 +b90fbd1a1d261900080c4706121220452910fcc4ecf4ec323231002fc4e4ece4f4c4ec10fed5 +ee1112393930b6602a802aa02a03015d01342623220615141633323617100221222627351e01 +3332363d010e0123220211101233321617353303a2a59594a5a59495a5b8fefefa61ac51519e +52b5b439b27ccefcfcce7cb239b8023dc8dcdcc8c7dcdcebfee2fee91d1eb32c2abdbf5b6362 +013a01030104013a6263aa00000200100000056805d50002000a00c240410011010004050402 +1105050401110a030a0011020003030a0711050406110505040911030a08110a030a42000307 +95010381090509080706040302010009050a0b10d4c4173931002f3ce4d4ec1239304b535807 +1005ed0705ed071005ed0705ed071008ed071005ed071005ed071008ed5922b2200c01015d40 +420f010f020f070f080f005800760070008c000907010802060309041601190256015802500c +67016802780176027c0372047707780887018802800c980299039604175d005d090121013301 +230321032302bcfeee0225fe7be50239d288fd5f88d5050efd1903aefa2b017ffe8100000002 +00c100000179061400030007002b400e06be04b100bc020501080400460810fc3cec3231002f +e4fcec30400b1009400950096009700905015d1333112311331523c1b8b8b8b80460fba00614 +e900000100ba0000049c0614000a00bc40290811050605071106060503110405040211050504 +420805020303bc009709060501040608010800460b10fcec32d4c4113931002f3cece4173930 +4b5358071004ed071005ed071005ed071004ed5922b2100c01015d405f04020a081602270229 +052b0856026602670873027705820289058e08930296059708a3021209050906020b030a0728 +03270428052b062b07400c6803600c8903850489058d068f079a039707aa03a705b607c507d6 +07f703f003f704f0041a5d71005d1333110133090123011123bab90225ebfdae026bf0fdc7b9 +0614fc6901e3fdf4fdac0223fddd00010071ffe303e7047b0019003f401b00860188040e860d +880ab91104b917b8118c1a07120d004814451a10fce432ec310010e4f4ec10fef4ee10f5ee30 +400b0f1b101b801b901ba01b05015d01152e0123220615141633323637150e01232200111000 +21321603e74e9d50b3c6c6b3509d4e4da55dfdfed6012d010655a20435ac2b2be3cdcde32b2b +aa2424013e010e0112013a230000000100ba000004640614001300344019030900030e010687 +0e11b80c970a010208004e0d09080b461410fcec32f4ec31002f3cecf4c4ec1112173930b260 +1501015d0111231134262322061511231133113e013332160464b87c7c95acb9b942b375c1c6 +02a4fd5c029e9f9ebea4fd870614fd9e6564ef00ffff0071ffe3047506101226001a00001106 +002273000014b4031f1a09072b4009401f4f1a301f3f1a045d31000200baffe304a40614000b +001c0038401903b90c0f09b918158c0fb81b971900121247180c06081a461d10fcec3232f4ec +31002fece4f4c4ec10c6ee30b6601e801ea01e03015d013426232206151416333236013e0133 +3200111002232226271523113303e5a79292a7a79292a7fd8e3ab17bcc00ffffcc7bb13ab9b9 +022fcbe7e7cbcbe7e702526461febcfef8fef8febc6164a806140001003d0000047f04600006 +00fb402703110405040211010205050402110302060006011100000642020300bf0506050302 +010504000710d44bb00a5458b90000004038594bb014544bb015545b58b90000ffc03859c417 +3931002fec3239304b5358071005ed071008ed071008ed071005ed592201408e48026a027b02 +7f02860280029102a402080600060109030904150015011a031a042600260129032904200835 +0035013a033a0430084600460149034904460548064008560056015903590450086600660169 +036904670568066008750074017b037b0475057a068500850189038904890586069600960197 +029a03980498059706a805a706b008c008df08ff083e5d005d133309013301233dc3015e015e +c3fe5cfa0460fc5403acfba00000000100b2ffe3052905d50011004040160802110b0005950e +8c09008112081c0a38011c00411210fc4bb0105458b90000ffc03859ecfcec310010e432f4ec +11393939393001b61f138f139f13035d133311141633323635113311100021200011b2cbaec3 +c2aecbfedffee6fee5fedf05d5fc75f0d3d3f0038bfc5cfedcfed6012a012400000200c90000 +055405d50013001c00b14035090807030a061103040305110404034206040015030415950914 +950d810b040506031109001c160e050a191904113f140a1c0c041d10fcec32fcc4ec11173911 +39393931002f3cf4ecd4ec123912391239304b5358071005ed071005ed1117395922b2401e01 +015d40427a130105000501050206030704150015011402160317042500250125022603270626 +0726082609201e3601360246014602680575047505771388068807980698071f5d005d011e01 +171323032e012b01112311212016151406011133323635342623038d417b3ecdd9bf4a8b78dc +ca01c80100fc83fd89fe9295959202bc16907efe68017f9662fd8905d5d6d88dba024ffdee87 +8383850000020071ffe30475047b000b0017004a401306b91200b90cb8128c1809120f510312 +15451810fcecf4ec310010e4f4ec10ee3040233f197b007b067f077f087f097f0a7f0b7b0c7f +0d7f0e7f0f7f107f117b12a019f01911015d0122061514163332363534262732001110002322 +00111000027394acab9593acac93f00112feeef0f1feef011103dfe7c9c9e7e8c8c7e99cfec8 +feecfeedfec701390113011401380000000100c90000046a05d500050025400c029500810401 +1c033a00040610fcecec31002fe4ec304009300750078003800404015d133311211521c9ca02 +d7fc5f05d5fad5aa00010073ffe3052705f000190036401a0da10eae0a951101a100ae049517 +91118c1a07190d003014101a10fcec32ec310010e4f4ecf4ec10eef6ee30b40f1b1f1b02015d +01152e0123200011100021323637150e01232000111000213216052766e782ff00fef0011001 +0082e7666aed84feadfe7a0186015386ed0562d55f5efec7fed8fed9fec75e5fd34848019f01 +670168019f47000000010044000007a605d5000c017b4049051a0605090a09041a0a09031a0a +0b0a021a01020b0b0a061107080705110405080807021103020c000c011100000c420a050203 +060300af0b080c0b0a09080605040302010b07000d10d4cc173931002f3cec32321739304b53 +58071005ed071008ed071008ed071005ed071008ed071005ed0705ed071008ed5922b2000e01 +015d40f206020605020a000a000a120a2805240a200a3e023e05340a300a4c024d05420a400a +59026a026b05670a600a7b027f027c057f05800a960295051d07000902080300040605000500 +0601070408000807090009040a0a0c000e1a0315041508190c100e2004210520062007200823 +09240a250b200e200e3c023a033504330530083609390b3f0c300e460046014a024004450540 +0542064207420840084009440a4d0c400e400e58025608590c500e6602670361046205600660 +0760086409640a640b770076017b027803770474057906790777087008780c7f0c7f0e860287 +038804890585098a0b8f0e97049f0eaf0e5b5d005d1333090133090133012309012344cc013a +0139e3013a0139cdfe89fefec5fec2fe05d5fb1204eefb1204eefa2b0510faf00000000100c9 +0000048b05d5000b002e401506950402950081089504ad0a05010907031c00040c10fcec32d4 +c4c431002fececf4ec10ee30b21f0d01015d132115211121152111211521c903b0fd1a02c7fd +3902f8fc3e05d5aafe46aafde3aa00000001003b000004790460000b01434046051106070604 +1103040707060411050401020103110202010b110001000a11090a0101000a110b0a07080709 +11080807420a070401040800bf05020a0704010408000208060c10d44bb00a544bb00f545b4b +b010545b4bb011545b58b90006004038594bb0145458b90006ffc03859c4d4c411173931002f +3cec321739304b5358071005ed071008ed071008ed071005ed071005ed071008ed071008ed07 +1005ed59220140980a04040a1a04150a260a3d04310a55045707580a660a76017a047607740a +8d04820a99049f049707920a900aa601a904af04a507a30aa00a1c0a03040505090a0b1a0315 +0515091a0b2903260525092a0b200d3a013903370534073609390b300d4903460545094a0b40 +0d590056015902590357055606590756085609590b500d6f0d78017f0d9b019407ab01a407b0 +0dcf0ddf0dff0d2f5d005d09022309012309013309010464fe6b01aad9febafebad901b3fe72 +d9012901290460fddffdc101b8fe48024a0216fe71018f00000200f0000001c3042300030007 +001c400e068304a60083020501030400180810fc3cec3231002fecf4ec303733152311331523 +f0d3d3d3d3fefe0423fe00000001002f000002f8061400130059401c0510010c08a906018700 +970e06bc0a02130700070905080d0f0b4c1410fc4bb00a5458b9000b004038594bb00e5458b9 +000bffc038593cc4fc3cc4c412393931002fe432fcec10ee321239393001b640155015a01503 +5d01152322061d012115211123112335333534363302f8b0634d012ffed1b9b0b0aebd061499 +5068638ffc2f03d18f4ebbab000200d7054603290610000300070092400e0602ce0400cd0801 +64000564040810dcfcd4ec310010fc3cec3230004bb00a544bb00d545b58bd00080040000100 +080008ffc03811373859014bb00c544bb00d545b4bb00e545b4bb017545b58bd0008ffc00001 +0008000800403811373859014bb00f544bb019545b58bd00080040000100080008ffc0381137 +3859401160016002600560067001700270057006085d0133152325331523025ecbcbfe79cbcb +0610cacaca00013500b800cb00cb00c100aa009c01a600b800660000007100cb00a002b20085 +007500b800c301cb0189022d00cb00a600f000d300aa008700cb03aa0400014a003300cb0000 +00d9050200f4015400b4009c01390114013907060400044e04b4045204b804e704cd00370473 +04cd04600473013303a2055605a60556053903c5021200c9001f00b801df007300ba03e90333 +03bc0444040e00df03cd03aa00e503aa0404000000cb008f00a4007b00b80014016f007f027b +0252008f00c705cd009a009a006f00cb00cd019e01d300f000ba018300d5009803040248009e +01d500c100cb00f600830354027f00000333026600d300c700a400cd008f009a0073040005d5 +010a00fe022b00a400b4009c00000062009c0000001d032d05d505d505d505f0007f007b0054 +00a406b80614072301d300b800cb00a601c301ec069300a000d3035c037103db0185042304a8 +0448008f0139011401390360008f05d5019a0614072306660179046004600460047b009c0000 +0277046001aa00e904600762007b00c5007f027b000000b4025205cd006600bc006600770610 +00cd013b01850389008f007b0000001d00cd074a042f009c009c0000077d006f0000006f0335 +006a006f007b00ae00b2002d0396008f027b00f600830354063705f6008f009c04e10266008f +018d02f600cd03440029006604ee00730000140000960000b707060504030201002c2010b002 +254964b040515820c859212d2cb002254964b040515820c859212d2c20100720b00050b00d79 +20b8ffff5058041b0559b0051cb0032508b0042523e120b00050b00d7920b8ffff5058041b05 +59b0051cb0032508e12d2c4b505820b0fd454459212d2cb002254560442d2c4b5358b00225b0 +022545445921212d2c45442d2cb00225b0022549b00525b005254960b0206368208a108a233a +8a10653a2d000001000000025eb8eadc5dee5f0f3cf5001f080000000000d3d94ef700000000 +d3d94ef7f7d6fc4c0e5909dc00000008000000010000000000010000076dfe1d00000efef7d6 +fa510e5900010000000000000000000000000000002304cd0066053f00c9051200ae051200ba +0514007104ec0071025c00c903230037034a00ba042b006f05790010068b005604e7007b0239 +00c10514007105790010023900c104a200ba04660071051200ba04e50071051400ba028b0000 +04bc003d05db00b2058f00c904e50071047500c90596007307e90044050e00c904bc003b02b2 +00f002d1002f040000d700000000000000440000016c000001f00000026800000300000003d4 +0000041c000004980000050800000668000007480000096c00000a9800000ad400000b9c0000 +0c9800000ce800000dd800000e7000000ee800000f1400000fac00000fac000010d000001154 +000012680000130c00001350000013e8000015a40000160400001788000017c8000018600000 +19180001000000230354002b0068000c000200100099000800000415021600080004b8028040 +fffbfe03fa1403f92503f83203f79603f60e03f5fe03f4fe03f32503f20e03f19603f02503ef +8a4105effe03ee9603ed9603ecfa03ebfa03eafe03e93a03e84203e7fe03e63203e5e45305e5 +9603e48a4105e45303e3e22f05e3fa03e22f03e1fe03e0fe03df3203de1403dd9603dcfe03db +1203da7d03d9bb03d8fe03d68a4105d67d03d5d44705d57d03d44703d3d21b05d3fe03d21b03 +d1fe03d0fe03cffe03cefe03cd9603cccb1e05ccfe03cb1e03ca3203c9fe03c6851105c61c03 +c51603c4fe03c3fe03c2fe03c1fe03c0fe03bffe03befe03bdfe03bcfe03bbfe03ba1103b986 +2505b9fe03b8b7bb05b8fe03b7b65d05b7bb03b78004b6b52505b65d40ff03b64004b52503b4 +fe03b39603b2fe03b1fe03b0fe03affe03ae6403ad0e03acab2505ac6403abaa1205ab2503aa +1203a98a4105a9fa03a8fe03a7fe03a6fe03a51203a4fe03a3a20e05a33203a20e03a16403a0 +8a4105a096039ffe039e9d0c059efe039d0c039c9b19059c64039b9a10059b19039a1003990a +0398fe0397960d0597fe03960d03958a410595960394930e05942803930e0392fa039190bb05 +91fe03908f5d0590bb039080048f8e25058f5d038f40048e25038dfe038c8b2e058cfe038b2e +038a8625058a410389880b05891403880b03878625058764038685110586250385110384fe03 +8382110583fe0382110381fe0380fe037ffe0340ff7e7d7d057efe037d7d037c64037b541505 +7b25037afe0379fe03780e03770c03760a0375fe0374fa0373fa0372fa0371fa0370fe036ffe +036efe036c21036bfe036a1142056a530369fe03687d036711420566fe0365fe0364fe0363fe +0362fe03613a0360fa035e0c035dfe035bfe035afe0359580a0559fa03580a03571619055732 +0356fe035554150555420354150353011005531803521403514a130551fe03500b034ffe034e +4d10054efe034d10034cfe034b4a13054bfe034a4910054a1303491d0d05491003480d0347fe +0346960345960344fe0343022d0543fa0342bb03414b0340fe033ffe033e3d12053e14033d3c +0f053d12033c3b0d053c40ff0f033b0d033afe0339fe033837140538fa033736100537140336 +350b05361003350b03341e03330d0332310b0532fe03310b03302f0b05300d032f0b032e2d09 +052e10032d09032c32032b2a25052b64032a2912052a25032912032827250528410327250326 +250b05260f03250b0324fe0323fe03220f03210110052112032064031ffa031e1d0d051e6403 +1d0d031c1142051cfe031bfa031a42031911420519fe031864031716190517fe031601100516 +190315fe0314fe0313fe031211420512fe0311022d05114203107d030f64030efe030d0c1605 +0dfe030c0110050c16030bfe030a100309fe0308022d0508fe030714030664030401100504fe +03401503022d0503fe0302011005022d0301100300fe0301b80164858d012b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b002b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b2b2b2b2b2b2b2b2b2b2b1d00> +] def +/f-0-0 currentdict end definefont pop +%%EndResource +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +%%PageBoundingBox: 39 29 799 563 +%%EndPageSetup +q 39 29 760 534 rectclip q +0 g +0.751181 w +0 J +0 j +[] 0.0 d +4 M q 1 0 0 -1 0 595.275574 cm +154.285 33.848 540 531.43 re S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +76.223 180.402 m 56.527 233.438 56.527 233.438 56.527 233.438 c h +76.223 180.402 m S Q +q 1 0 0 -1 0 595.275574 cm +76.223 180.402 m 87.59 231.922 l h +76.223 180.402 m S Q +q 1 0 0 -1 0 595.275574 cm +76.223 180.402 m 76.223 129.645 l h +76.223 180.402 m S Q +1.081781 w +q 1 0 0 -1 0 595.275574 cm +86.609 119.102 m 86.609 124.852 81.949 129.516 76.195 129.516 c 70.445 +129.516 65.781 124.852 65.781 119.102 c 65.781 113.348 70.445 108.688 76.195 + 108.688 c 81.949 108.688 86.609 113.348 86.609 119.102 c h +86.609 119.102 m S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +76.223 152.562 m 52.738 143.281 l h +76.223 152.562 m S Q +q 1 0 0 -1 0 595.275574 cm +99.395 142.516 m 76.223 152.562 l h +99.395 142.516 m S Q +q 1 0 0 -1 0 595.275574 cm +77.297 481.609 m 57.598 534.641 57.598 534.641 57.598 534.641 c h +77.297 481.609 m S Q +q 1 0 0 -1 0 595.275574 cm +77.297 481.609 m 88.66 533.125 l h +77.297 481.609 m S Q +q 1 0 0 -1 0 595.275574 cm +77.297 481.609 m 77.297 430.848 l h +77.297 481.609 m S Q +1.081781 w +q 1 0 0 -1 0 595.275574 cm +87.684 420.305 m 87.684 426.059 83.02 430.723 77.27 430.723 c 71.516 430.723 + 66.852 426.059 66.852 420.305 c 66.852 414.555 71.516 409.891 77.27 409.891 + c 83.02 409.891 87.684 414.555 87.684 420.305 c h +87.684 420.305 m S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +77.297 453.766 m 53.809 444.484 l h +77.297 453.766 m S Q +q 1 0 0 -1 0 595.275574 cm +100.465 443.723 m 77.297 453.766 l h +100.465 443.723 m S Q +q 1 0 0 -1 0 595.275574 cm +774.797 185.895 m 755.098 238.926 755.098 238.926 755.098 238.926 c h +774.797 185.895 m S Q +q 1 0 0 -1 0 595.275574 cm +774.797 185.895 m 786.16 237.414 l h +774.797 185.895 m S Q +q 1 0 0 -1 0 595.275574 cm +774.797 185.895 m 774.797 135.133 l h +774.797 185.895 m S Q +1.081781 w +q 1 0 0 -1 0 595.275574 cm +785.184 124.59 m 785.184 130.344 780.52 135.008 774.77 135.008 c 769.016 + 135.008 764.352 130.344 764.352 124.59 c 764.352 118.84 769.016 114.176 + 774.77 114.176 c 780.52 114.176 785.184 118.84 785.184 124.59 c h +785.184 124.59 m S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +774.797 158.051 m 751.309 148.773 l h +774.797 158.051 m S Q +q 1 0 0 -1 0 595.275574 cm +797.965 148.008 m 774.797 158.051 l h +797.965 148.008 m S Q +BT +10 0 0 10 53.429585 349.631355 Tm +/f-0-0 1 Tf +[(K)48(unden)]TJ +-1.483805 -29.806774 Td +[(Inter)19(essenten)]TJ +70.306055 29.330022 Td +[(V)79(erwaltu)-3(ng)]TJ +ET +0.507321 w +q 1 0 0 -1 0 595.275574 cm +309.531 312.383 m 309.531 326.168 286.527 337.344 258.156 337.344 c 229.781 + 337.344 206.777 326.168 206.777 312.383 c 206.777 298.594 229.781 287.418 + 258.156 287.418 c 286.527 287.418 309.531 298.594 309.531 312.383 c h +309.531 312.383 m S Q +BT +10 0 0 10 242.133 287.346844 Tm +/f-0-0 1 Tf +[(Artik)34(el)]TJ +-1.667065 -1.256468 Td +[(dur)20(chs)-3(t\366ber)17(n)]TJ +ET +0.514942 w +q 1 0 0 -1 0 595.275574 cm +643.047 215.141 m 643.047 229.133 619.699 240.48 590.898 240.48 c 562.098 + 240.48 538.754 229.133 538.754 215.141 c 538.754 201.145 562.098 189.801 + 590.898 189.801 c 619.699 189.801 643.047 201.145 643.047 215.141 c h +643.047 215.141 m S Q +BT +10 0 0 10 549.207029 378.024066 Tm +/f-0-0 1 Tf +[(Artik)34(el verwalten)]TJ +ET +0.59857 w +q 1 0 0 -1 0 595.275574 cm +647.379 123.18 m 647.379 139.445 620.238 152.633 586.762 152.633 c 553.285 + 152.633 526.145 139.445 526.145 123.18 c 526.145 106.914 553.285 93.727 + 586.762 93.727 c 620.238 93.727 647.379 106.914 647.379 123.18 c h +647.379 123.18 m S Q +BT +15 0 0 15 530.686621 467.614354 Tm +/f-0-0 1 Tf +[(User ver)-3(walten)]TJ +ET +0.583528 w +q 1 0 0 -1 0 595.275574 cm +454.879 441.176 m 454.879 457.035 428.422 469.891 395.785 469.891 c 363.148 + 469.891 336.691 457.035 336.691 441.176 c 336.691 425.32 363.148 412.461 + 395.785 412.461 c 428.422 412.461 454.879 425.32 454.879 441.176 c h +454.879 441.176 m S Q +BT +15 0 0 15 353.796872 149.280778 Tm +/f-0-0 1 Tf +[(R)44(egistration)]TJ +ET +0.514083 w +q 1 0 0 -1 0 595.275574 cm +450.289 225.156 m 450.289 239.129 426.98 250.453 398.227 250.453 c 369.473 + 250.453 346.164 239.129 346.164 225.156 c 346.164 211.184 369.473 199.859 + 398.227 199.859 c 426.98 199.859 450.289 211.184 450.289 225.156 c h +450.289 225.156 m S Q +BT +29.999999 0 0 29.999999 355.765094 359.790292 Tm +/f-0-0 1 Tf +[(L)18(ogin)]TJ +ET +0.539014 w +q 1 0 0 -1 0 595.275574 cm +290.52 132.422 m 290.52 147.07 266.082 158.945 235.934 158.945 c 205.789 + 158.945 181.352 147.07 181.352 132.422 c 181.352 117.773 205.789 105.898 + 235.934 105.898 c 266.082 105.898 290.52 117.773 290.52 132.422 c h +290.52 132.422 m S Q +BT +15 0 0 15 201.890857 458.40071 Tm +/f-0-0 1 Tf +[(Chec)-3(k)34(out)]TJ +ET +0.527848 w +q 1 0 0 -1 0 595.275574 cm +451.707 120.004 m 451.707 134.348 427.773 145.977 398.25 145.977 c 368.73 + 145.977 344.797 134.348 344.797 120.004 c 344.797 105.66 368.73 94.031 +398.25 94.031 c 427.773 94.031 451.707 105.66 451.707 120.004 c h +451.707 120.004 m S Q +BT +10 0 0 10 375.228981 481.261504 Tm +/f-0-0 1 Tf +[(Artik)34(el in)]TJ +-1.85457 -1.348001 Td +[(W)65(ar)20(enk)33(orb legen)]TJ +ET +0.75 w +q 1 0 0 -1 0 595.275574 cm +77.297 453.766 m 231.035 333.582 l S Q +0.751181 w +[ 4.507086 4.507086] 0 d +q 1 0 0 -1 0 595.275574 cm +397.941 250.453 m 396.109 412.465 l S Q +397.855 337.311 m 400.828 334.272 l 397.941 344.822 l 394.816 334.342 l + h +397.855 337.311 m f* +0.801209 w +[] 0.0 d +q -0.0113087 -1 -1 0.0113087 0 595.275574 cm +253.433 -400.721 m 256.438 -403.728 l 245.921 -400.722 l 256.436 -397.716 + l h +253.433 -400.721 m S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +77.297 453.766 m 336.887 443.504 l S Q +q 1 0 0 -1 0 595.275574 cm +233.289 290.535 m 76.223 152.562 l S Q +q 1 0 0 -1 0 595.275574 cm +183.102 139.082 m 76.223 152.562 l S Q +0.751181 w +[ 4.507087 4.507087] 0 d +q 1 0 0 -1 0 595.275574 cm +289.855 128.297 m 345.449 124.043 l S Q +337.957 470.658 m 335.191 467.436 l 345.449 471.233 l 334.734 473.428 l + h +337.957 470.658 m f* +0.798926 w +[] 0.0 d +q -1 -0.0764989 -0.0764989 1 0 595.275574 cm +-326.513 -149.595 m -323.519 -152.589 l -334.005 -149.594 l -323.52 -146.597 + l h +-326.513 -149.595 m S Q +0.75 w +[ 4.5 4.5] 0 d +q 1 0 0 -1 0 595.275574 cm +398.246 145.977 m 398.234 199.859 l S Q +398.234 402.916 m 395.234 405.916 l 398.234 395.416 l 401.234 405.916 l + h +398.234 402.916 m f* +0.8 w +[] 0.0 d +q 0.000238639 1 1 -0.000238639 0 595.275574 cm +-192.264 398.28 m -189.265 395.28 l -199.764 398.282 l -189.264 401.28 +l h +-192.264 398.28 m S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +634.844 201.496 m 774.797 158.051 l S Q +q 1 0 0 -1 0 595.275574 cm +643.395 133.684 m 774.797 158.051 l S Q +1 g +406.227 267.701 126.172 -14.59 re f +0 g +0.585796 w +q 1 0 0 -1 0 595.275574 cm +406.227 327.574 126.172 14.59 re S Q +1 g +409.594 428.561 39.824 -12.254 re f +0 g +0.433407 w +q 1 0 0 -1 0 595.275574 cm +409.594 166.715 39.824 12.254 re S Q +1 g +300.859 513.604 14.004 -40.035 re f +0 g +0.404328 w +q 1 0 0 -1 0 595.275574 cm +300.859 81.672 14.004 40.035 re S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +406.227 334.773 m 396.621 334.758 l S Q +q 1 0 0 -1 0 595.275574 cm +409.594 173.957 m 398.199 174.594 l S Q +q 1 0 0 -1 0 595.275574 cm +308.906 121.707 m 309.152 126.395 l S Q +BT +10 0 0 10 408.650489 257.082029 Tm +/f-0-0 1 Tf +[(Extends)-3(: if k)33(ein A)17(ccoun)-3(t)]TJ +0.274957 16.187922 Td +[(Include)]TJ +0 10 -10 0 311.264778 475.588688 Tm +[(Include)]TJ +ET +Q Q +showpage +%%Trailer +end restore +%%EOF diff --git a/docs/diagrammes/use_case.svg b/docs/diagrammes/use_case.svg new file mode 100644 index 0000000..a191907 --- /dev/null +++ b/docs/diagrammes/use_case.svg @@ -0,0 +1,608 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kunden + Interessenten + Verwaltung + + + + + Artikel + durchstöbern + + + + Artikel verwalten + + + + User verwalten + + + + Registration + + + + Login + + + + Checkout + + + + Artikel in + Warenkorb legen + + + + + + + + + + + + + + + + + Extends: if kein Account + Include + Include + + + From c66512a03917afeaea10f11f0b201ecf5ec8ff2e Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 7 Jan 2018 18:52:40 +0100 Subject: [PATCH 44/53] finalize the use case diagramm section --- docs/doku.org | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/doku.org b/docs/doku.org index d557335..88e6ad6 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -480,7 +480,7 @@ ein Ergebnis eines Anwendungsfalls sein (e.g. falsches Pass- wort beim Login). Dabei wird die technische Lösung nicht konkret beschrieben. Die Detailstufe kann dabei sehr unterschiedlich sein.\footcite{usecase} -**** TODO Use Case Diagramm +**** TODO Anwendungsfalliagramm "Ein Anwendungsfalldiagramm ... ist eine der 14 Diagrammarten der Unified Modeling Language (UML), einer Sprache für die Modellierung @@ -488,10 +488,18 @@ der Strukturen und des Verhaltens von Software- und anderen Systemen. Es stellt Anwendungsfälle und Akteure mit ihren jeweiligen Abhängigkeiten und Beziehungen dar."\footcite{usecasediagramm} +Das Anwendungsfalldiagramm für unseren Webshop ist in der Abbildung: +([[fig:usecase]]) zu sehen. Wir haben uns dabei auf die Hauptaspekte des +Webshops beschränkt. + +#+LATEX:\newpage +#+LATEX:\begin{landscape} #+CAPTION: Anwendungsfalldiagramm -#+ATTR_LATEX: :width .9\textwidth +#+ATTR_LATEX: :height.9\textwidth #+NAME: fig:usecase -[[file:diagrammes/use_case.esp]] +[[file:diagrammes/use_case.eps]] +#+LATEX:\end{landscape} +#+LATEX:\newpage **** NEXT Use Case Detailbeschreibung From 8fdd019d50b333a61cc96b2c8bb9150e66a33727 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 7 Jan 2018 23:46:40 +0100 Subject: [PATCH 45/53] reformat the tables --- docs/doku.org | 241 ++++++++++++++++++++++++++------------------------ 1 file changed, 125 insertions(+), 116 deletions(-) diff --git a/docs/doku.org b/docs/doku.org index 88e6ad6..d1dbd58 100644 --- a/docs/doku.org +++ b/docs/doku.org @@ -65,23 +65,24 @@ nach Prioritäten gewichtet. #+CAPTION: Projektziele #+ATTR_LATEX: :align |>{\columncolor[HTML]{EFEFEF}}p{0.8cm}|l|p{1.5cm}| #+NAME: tab:projektziele -|-------+--------------------------------------------------------------------+-------------| -| *Nr.* | *Beschreibung* | *Priorität* | -|-------+--------------------------------------------------------------------+-------------| -| 1. | Das Datenmodel muss korrekt konzipiert sein. | Hoch | -|-------+--------------------------------------------------------------------+-------------| -| 2. | Alle Vorgehen müssen in diesem Dokument erläutert werden. | Mittel | -|-------+--------------------------------------------------------------------+-------------| -| 3. | Die Arbeitsstunden müssen eingehalten werden. | Tief | -|-------+--------------------------------------------------------------------+-------------| -| 4. | Der Shop muss funktionstüchtig sein. | Mittel | -|-------+--------------------------------------------------------------------+-------------| -| 5. | Die Applikation muss vor der Übergabe vollständig getestet werden. | Hoch | -|-------+--------------------------------------------------------------------+-------------| -| 6. | Problemstellungen müssen ersichtlich dokumentiert werden. | Mittel | -|-------+--------------------------------------------------------------------+-------------| -| 7. | Die Punkte der Bewertung werden erfüllt. | Hoch | -|-------+--------------------------------------------------------------------+-------------| +|-------+--------------------------------------------------------------------+----------------------| +| <5> | | <20> | +| *Nr.*\cellcolor[HTML]{C0C0C0} | *Beschreibung*\cellcolor[HTML]{C0C0C0} | *Priorität*\cellcolor[HTML]{C0C0C0} | +|-------+--------------------------------------------------------------------+----------------------| +| 1. | Das Datenmodel muss korrekt konzipiert sein. | Hoch | +|-------+--------------------------------------------------------------------+----------------------| +| 2. | Alle Vorgehen müssen in diesem Dokument erläutert werden. | Mittel | +|-------+--------------------------------------------------------------------+----------------------| +| 3. | Die Arbeitsstunden müssen eingehalten werden. | Tief | +|-------+--------------------------------------------------------------------+----------------------| +| 4. | Der Shop muss funktionstüchtig sein. | Mittel | +|-------+--------------------------------------------------------------------+----------------------| +| 5. | Die Applikation muss vor der Übergabe vollständig getestet werden. | Hoch | +|-------+--------------------------------------------------------------------+----------------------| +| 6. | Problemstellungen müssen ersichtlich dokumentiert werden. | Mittel | +|-------+--------------------------------------------------------------------+----------------------| +| 7. | Die Punkte der Bewertung werden erfüllt. | Hoch | +|-------+--------------------------------------------------------------------+----------------------| ** Mittel und Methoden *** Werkzeuge @@ -315,7 +316,7 @@ Tabelle: ([[tab:swot]]) zu sehen. #+ATTR_LATEX: :align |p{.22\textwidth}|p{.22\textwidth}|p{.22\textwidth}|p{.22\textwidth}| #+NAME: tab:swot |----------------------+----------------------+----------------------+----------------------| -| *Stärken* | *Schwächen* | *Chancen* | *Gefahren* | +| *Stärken*\cellcolor[HTML]{C0C0C0} | *Schwächen*\cellcolor[HTML]{C0C0C0} | *Chancen*\cellcolor[HTML]{C0C0C0} | *Gefahren*\cellcolor[HTML]{C0C0C0} | | <20> | <20> | <20> | <20> | |----------------------+----------------------+----------------------+----------------------| | Wir als Programmierer haben ein gutes Know-How im Bereich Datenbanken | Wir als Programmierer haben keine Erfahrung im Konsumsegment unseres Nutzers | | | @@ -336,25 +337,29 @@ mit Einschätzung der Wahrscheinlichkeit der Einflussnahme aufgenommen. Zusätzlich ist die Beziehung der Stakeholder zum Projekt noch in der Abbildung: ([[fig:umweltgrafik]]) grafisch dargestellt. +#+LATEX:\newpage +#+LATEX:\begin{landscape} #+CAPTION: Umwelt-Analyse #+ATTR_LATEX: :align |>{\columncolor[HTML]{EFEFEF}}p{0.8cm}|l|l|p{8cm}|l| #+NAME: tab:umweltanalyse -|-----+---------------+----------+-----------------------------------------------+-------------------| -| Nr. | Stakeholder | Einfluss | Anforderung/Wünsche | Warscheinlichkeit | -|-----+---------------+----------+-----------------------------------------------+-------------------| -| 1. | Auftraggeber | hoch | - Innovatives Produkt auf dem Markt anbieten. | hoch | -| | | | - Einhaltung von Terminen und Qualität. | hoch | -|-----+---------------+----------+-----------------------------------------------+-------------------| -| 2. | Kunden | gering | - Einfache Lösung die anpassungsfähig ist. | hoch | -| | | | - Schnell anfangen können. | hoch | -| | | | - Viele Arbeitsschritte Automatisieren | mittel | -|-----+---------------+----------+-----------------------------------------------+-------------------| -| 3. | Interessenten | gering | - Intuitiv bedienbare Webseite | hoch | -| | | | - schnell finden was gesucht wird. | hoch | -|-----+---------------+----------+-----------------------------------------------+-------------------| -| 4. | Projektleiter | hoch | - Gutes Innovatives Produkt erschaffen. | mittel | -| | | | - Anerkennung im fachlichen Umfeld | hoch | -|-----+---------------+----------+-----------------------------------------------+-------------------| +|-------+----------------------+----------------------+-----------------------------------------------+---------------------------------------------| +| <5> | <20> | <20> | | | +| *Nr*.\cellcolor[HTML]{C0C0C0} | *Stakeholder*\cellcolor[HTML]{C0C0C0} | *Einfluss*\cellcolor[HTML]{C0C0C0} | *Anforderung/Wünsche*\cellcolor[HTML]{C0C0C0} | *Warscheinlichkeit*\cellcolor[HTML]{C0C0C0} | +|-------+----------------------+----------------------+-----------------------------------------------+---------------------------------------------| +| 1. | Auftraggeber | hoch | - Innovatives Produkt auf dem Markt anbieten. | hoch | +| | | | - Einhaltung von Terminen und Qualität. | hoch | +|-------+----------------------+----------------------+-----------------------------------------------+---------------------------------------------| +| 2. | Kunden | gering | - Einfache Lösung die anpassungsfähig ist. | hoch | +| | | | - Schnell anfangen können. | hoch | +| | | | - Viele Arbeitsschritte Automatisieren | mittel | +|-------+----------------------+----------------------+-----------------------------------------------+---------------------------------------------| +| 3. | Interessenten | gering | - Intuitiv bedienbare Webseite | hoch | +| | | | - schnell finden was gesucht wird. | hoch | +|-------+----------------------+----------------------+-----------------------------------------------+---------------------------------------------| +| 4. | Projektleiter | hoch | - Gutes Innovatives Produkt erschaffen. | mittel | +| | | | - Anerkennung im fachlichen Umfeld | hoch | +|-------+----------------------+----------------------+-----------------------------------------------+---------------------------------------------| +#+LATEX:\end{landscape} #+CAPTION: Stakeholder Diagramm #+ATTR_LATEX: :width .9\textwidth @@ -367,43 +372,43 @@ Abbildung: ([[fig:umweltgrafik]]) grafisch dargestellt. #+CAPTION: Risikobeschreibung #+ATTR_LATEX: :align |>{\columncolor[HTML]{EFEFEF}}p{0.8cm}|p{5cm}|p{5cm}|p{0.8cm}|p{0.8cm}| #+NAME: tab:risikobeschreibung -|-----+--------------------------------+--------------------------------+-----+-----| -| | <30> | <30> | | | -| Nr. | Beschreibung | Massnahmen | W^1 | A^2 | -|-----+--------------------------------+--------------------------------+-----+-----| -| 1. | Die Datenbank ist schlecht modeliert. | Das ERM nach dessen Erstellung gründlich auf Fehler prüfen, falls nötig extern prüfen lassen. | 2 | 3 | -|-----+--------------------------------+--------------------------------+-----+-----| -| 2. | Viel Arbeit an der Arbeitsstelle, dabei bleibt weniger Zeit für die Casestudy. | Die Zeit die einem zur Verfügung steht nutzen und fixe Tage definieren. Projektplanung machen. | 1 | 2 | -|-----+--------------------------------+--------------------------------+-----+-----| -| 3. | Know-How zur Umsetzung ist nicht vollständig vorhanden. | Gute Informationsbeschaffung im Internet, Mitschülern, Arbeitgeber, Dozenten etc. | 2 | 2 | -|-----+--------------------------------+--------------------------------+-----+-----| -| 4. | Kommunikation innerhalb des Teams. | Klare Arbeitsaufteilung innerhalb des Teams und alle 2 Wochen Besprechungen über offene Aufgaben oder Problembehandlungen | 1 | 1 | -|-----+--------------------------------+--------------------------------+-----+-----| -| 5. | Die Programmierung des Shops benötigt zuviel Zeit | Beider Projektplanung genau definieren was die GUI Applikation beinhalten muss. Ziele definieren, abgrenzungen treffen. | 3 | 1 | -|-----+--------------------------------+--------------------------------+-----+-----| +|------------+--------------------------------+--------------------------------+-------------------------------+-------------------------------| +| <10> | <30> | <30> | | | +| *Nr.*\cellcolor[HTML]{C0C0C0} | *Beschreibung*\cellcolor[HTML]{C0C0C0} | *Massnahmen*\cellcolor[HTML]{C0C0C0} | *W^1*\cellcolor[HTML]{C0C0C0} | *A^2*\cellcolor[HTML]{C0C0C0} | +|------------+--------------------------------+--------------------------------+-------------------------------+-------------------------------| +| 1. | Die Datenbank ist schlecht modeliert. | Das ERM nach dessen Erstellung gründlich auf Fehler prüfen, falls nötig extern prüfen lassen. | 2 | 3 | +|------------+--------------------------------+--------------------------------+-------------------------------+-------------------------------| +| 2. | Viel Arbeit an der Arbeitsstelle, dabei bleibt weniger Zeit für die Casestudy. | Die Zeit die einem zur Verfügung steht nutzen und fixe Tage definieren. Projektplanung machen. | 1 | 2 | +|------------+--------------------------------+--------------------------------+-------------------------------+-------------------------------| +| 3. | Know-How zur Umsetzung ist nicht vollständig vorhanden. | Gute Informationsbeschaffung im Internet, Mitschülern, Arbeitgeber, Dozenten etc. | 2 | 2 | +|------------+--------------------------------+--------------------------------+-------------------------------+-------------------------------| +| 4. | Kommunikation innerhalb des Teams. | Klare Arbeitsaufteilung innerhalb des Teams und alle 2 Wochen Besprechungen über offene Aufgaben oder Problembehandlungen | 1 | 1 | +|------------+--------------------------------+--------------------------------+-------------------------------+-------------------------------| +| 5. | Die Programmierung des Shops benötigt zuviel Zeit | Beider Projektplanung genau definieren was die GUI Applikation beinhalten muss. Ziele definieren, abgrenzungen treffen. | 3 | 1 | +|------------+--------------------------------+--------------------------------+-------------------------------+-------------------------------| *** NEXT Risikobewertung #+CAPTION: Risikobewertung Wahrscheinlichkeit #+ATTR_LATEX: :align l|l #+NAME: tab:wahrscheinlichkeit -| Bewertung | Beschreibung: Warscheinlichkeit (W) | -|------------+-------------------------------------| -| 1 = gering | Unwarscheinlich, <20% | -| 2 = mittel | Mässig warscheinlich, 20-50% | -| 3 = hoch | Hohe warscheinlichkeit > 50% | +| *Bewertung* | *Beschreibung: Warscheinlichkeit (W)* | +|-------------+---------------------------------------| +| 1 = gering | Unwarscheinlich, <20% | +| 2 = mittel | Mässig warscheinlich, 20-50% | +| 3 = hoch | Hohe warscheinlichkeit > 50% | #+CAPTION: Risikobewertung Auswirkung #+ATTR_LATEX: :align l|l #+NAME: tab:auswirkung -| Bewertung | Beschreibung: Auswirkung (A) | -|------------+-------------------------------------------------| -| 1 = gering | geringe auswirkungen auf das Gesammtergebniss | -| 2 = mittel | Arbeitsumstellung oder grösserer Arbeitsaufwand | -| 3 = hoch | Projekt erfüllt nicht alle Anforderungen | +| *Bewertung* | *Beschreibung: Auswirkung (A)* | +|-------------+-------------------------------------------------| +| 1 = gering | geringe auswirkungen auf das Gesammtergebniss | +| 2 = mittel | Arbeitsumstellung oder grösserer Arbeitsaufwand | +| 3 = hoch | Projekt erfüllt nicht alle Anforderungen | #+CAPTION: Grafische Darstellung der Risikoanalyse -#+ATTR_LATEX: :width \textwidth +#+ATTR_LATEX: :width 9cm #+NAME: fig:risk [[file:diagrammes/risk_analysis.eps]] @@ -506,35 +511,35 @@ Webshops beschränkt. #+CAPTION: Use Case #+ATTR_LATEX: :align |>{\columncolor[HTML]{EFEFEF}}p{.25\textwidth}|p{.7\textwidth}| #+NAME: tab:login -|-------------------+-----------------------------| -| Identifier + Name | | -|-------------------+-----------------------------| -| Description | | -|-------------------+-----------------------------| -| Actors | | -|-------------------+-----------------------------| -| Status | Freigegeben | -|-------------------+-----------------------------| -| Includes | - | -|-------------------+-----------------------------| -| Trigger | | -|-------------------+-----------------------------| -| Preconditions | | -|-------------------+-----------------------------| -| Postconditions | | -|-------------------+-----------------------------| -| Normal Flow | | -|-------------------+-----------------------------| -| Alternative Flow | - | -|-------------------+-----------------------------| -| Notes | - | -|-------------------+-----------------------------| -| UC History | 1.0 Darft erstellt durch AZ | -|-------------------+-----------------------------| -| Author | A. Zweili & I. | -|-------------------+-----------------------------| -| Date | | -|-------------------+-----------------------------| +|---------------------+-----------------------------| +| *Identifier + Name* | | +|---------------------+-----------------------------| +| *Description* | | +|---------------------+-----------------------------| +| *Actors* | | +|---------------------+-----------------------------| +| *Status* | Freigegeben | +|---------------------+-----------------------------| +| *Includes* | - | +|---------------------+-----------------------------| +| *Trigger* | | +|---------------------+-----------------------------| +| *Preconditions* | | +|---------------------+-----------------------------| +| *Postconditions* | | +|---------------------+-----------------------------| +| *Normal Flow* | | +|---------------------+-----------------------------| +| *Alternative Flow* | - | +|---------------------+-----------------------------| +| *Notes* | - | +|---------------------+-----------------------------| +| *UC History* | 1.0 Darft erstellt durch AZ | +|---------------------+-----------------------------| +| *Author* | A. Zweili & I. | +|---------------------+-----------------------------| +| *Date* | | +|---------------------+-----------------------------| *** NEXT Mockup @@ -649,37 +654,41 @@ Webshops beschränkt. ** Testfälle +#+LATEX:\newpage +#+LATEX:\begin{landscape} #+CAPTION: Testfälle #+ATTR_LATEX: :environment longtable :align |>{\columncolor[HTML]{EFEFEF}}p{1.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}| #+NAME: tab:testcases -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| Testcase | Objective | Precondition | Steps | Testdata | Expected | Postcondition | Result | -| ID | | | | | Result | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-01 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-02 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-03 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-04 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-05 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-06 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-07 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-08 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-09 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-10 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-11 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| -| TC-12 | | | | | | | | -|----------+-----------+--------------+-------+----------+----------+---------------+--------| +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| <20> | <20> | <20> | <20> | <20> | <20> | <20> | <20> | +| *Testcase ID*\cellcolor[HTML]{C0C0C0} | *Objective*\cellcolor[HTML]{C0C0C0} | *Precondition*\cellcolor[HTML]{C0C0C0} | *Steps*\cellcolor[HTML]{C0C0C0} | *Testdata*\cellcolor[HTML]{C0C0C0} | *Expected Result*\cellcolor[HTML]{C0C0C0} | *Postcondition*\cellcolor[HTML]{C0C0C0} | *Result*\cellcolor[HTML]{C0C0C0} | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-01* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-02* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-03* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-04* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-05* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-06* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-07* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-08* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-09* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-10* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-11* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +| *TC-12* | | | | | | | | +|----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------| +#+LATEX:\end{landscape} +#+LATEX:\newpage * Fazit ** Projektmanagement From 56e10eab5fcd4cb3efd7f6f094859a2dd06d85b7 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 7 Jan 2018 23:46:54 +0100 Subject: [PATCH 46/53] add minor corrections to the use case diagramm --- docs/diagrammes/use_case.eps | 79 ++++---- docs/diagrammes/use_case.svg | 368 +++++++++++++++++------------------ 2 files changed, 219 insertions(+), 228 deletions(-) diff --git a/docs/diagrammes/use_case.eps b/docs/diagrammes/use_case.eps index 6a1f9ae..3bf4eb1 100644 --- a/docs/diagrammes/use_case.eps +++ b/docs/diagrammes/use_case.eps @@ -1,6 +1,6 @@ %!PS-Adobe-3.0 EPSF-3.0 %%Creator: cairo 1.14.10 (http://cairographics.org) -%%CreationDate: Sun Jan 7 18:45:56 2018 +%%CreationDate: Sun Jan 7 23:14:00 2018 %%Pages: 1 %%DocumentData: Clean7Bit %%LanguageLevel: 2 @@ -480,10 +480,10 @@ q 1 0 0 -1 0 595.275574 cm 258.156 287.418 c 286.527 287.418 309.531 298.594 309.531 312.383 c h 309.531 312.383 m S Q BT -10 0 0 10 242.133 287.346844 Tm +10 0 0 10 242.566228 287.346855 Tm /f-0-0 1 Tf [(Artik)34(el)]TJ --1.667065 -1.256468 Td +-1.750978 -1.256468 Td [(dur)20(chs)-3(t\366ber)17(n)]TJ ET 0.514942 w @@ -493,7 +493,7 @@ q 1 0 0 -1 0 595.275574 cm 590.898 189.801 c 619.699 189.801 643.047 201.145 643.047 215.141 c h 643.047 215.141 m S Q BT -10 0 0 10 549.207029 378.024066 Tm +10 0 0 10 548.829418 376.408389 Tm /f-0-0 1 Tf [(Artik)34(el verwalten)]TJ ET @@ -504,7 +504,7 @@ q 1 0 0 -1 0 595.275574 cm 586.762 93.727 c 620.238 93.727 647.379 106.914 647.379 123.18 c h 647.379 123.18 m S Q BT -15 0 0 15 530.686621 467.614354 Tm +15 0 0 15 529.977917 466.504086 Tm /f-0-0 1 Tf [(User ver)-3(walten)]TJ ET @@ -515,7 +515,7 @@ q 1 0 0 -1 0 595.275574 cm 395.785 412.461 c 428.422 412.461 454.879 425.32 454.879 441.176 c h 454.879 441.176 m S Q BT -15 0 0 15 353.796872 149.280778 Tm +15 0 0 15 350.443192 149.960161 Tm /f-0-0 1 Tf [(R)44(egistration)]TJ ET @@ -526,7 +526,7 @@ q 1 0 0 -1 0 595.275574 cm 398.227 199.859 c 426.98 199.859 450.289 211.184 450.289 225.156 c h 450.289 225.156 m S Q BT -29.999999 0 0 29.999999 355.765094 359.790292 Tm +15 0 0 15 377.905639 365.981174 Tm /f-0-0 1 Tf [(L)18(ogin)]TJ ET @@ -537,7 +537,7 @@ q 1 0 0 -1 0 595.275574 cm 235.934 105.898 c 266.082 105.898 290.52 117.773 290.52 132.422 c h 290.52 132.422 m S Q BT -15 0 0 15 201.890857 458.40071 Tm +15 0 0 15 200.570256 457.262714 Tm /f-0-0 1 Tf [(Chec)-3(k)34(out)]TJ ET @@ -593,53 +593,58 @@ q -1 -0.0764989 -0.0764989 1 0 595.275574 cm 0.75 w [ 4.5 4.5] 0 d q 1 0 0 -1 0 595.275574 cm -398.246 145.977 m 398.234 199.859 l S Q -398.234 402.916 m 395.234 405.916 l 398.234 395.416 l 401.234 405.916 l - h +398.246 145.977 m 398.23 199.859 l S Q +398.234 402.916 m 395.234 405.916 l 398.23 395.416 l 401.234 405.916 l +h 398.234 402.916 m f* 0.8 w [] 0.0 d -q 0.000238639 1 1 -0.000238639 0 595.275574 cm --192.264 398.28 m -189.265 395.28 l -199.764 398.282 l -189.264 401.28 -l h --192.264 398.28 m S Q +q 0.000263047 1 1 -0.000263047 0 595.275574 cm +-192.255 398.285 m -189.255 395.284 l -199.755 398.283 l -189.254 401.284 + l h +-192.255 398.285 m S Q 0.75 w q 1 0 0 -1 0 595.275574 cm 634.844 201.496 m 774.797 158.051 l S Q q 1 0 0 -1 0 595.275574 cm 643.395 133.684 m 774.797 158.051 l S Q -1 g -406.227 267.701 126.172 -14.59 re f -0 g -0.585796 w -q 1 0 0 -1 0 595.275574 cm -406.227 327.574 126.172 14.59 re S Q -1 g -409.594 428.561 39.824 -12.254 re f -0 g -0.433407 w -q 1 0 0 -1 0 595.275574 cm -409.594 166.715 39.824 12.254 re S Q -1 g -300.859 513.604 14.004 -40.035 re f -0 g -0.404328 w -q 1 0 0 -1 0 595.275574 cm -300.859 81.672 14.004 40.035 re S Q -0.75 w q 1 0 0 -1 0 595.275574 cm 406.227 334.773 m 396.621 334.758 l S Q q 1 0 0 -1 0 595.275574 cm 409.594 173.957 m 398.199 174.594 l S Q q 1 0 0 -1 0 595.275574 cm 308.906 121.707 m 309.152 126.395 l S Q +1 g +406.227 267.701 126.172 -14.59 re f +0 g +0.585796 w +q 1 0 0 -1 0 595.275574 cm +406.227 327.574 126.172 14.59 re S Q BT -10 0 0 10 408.650489 257.082029 Tm +10 0 0 10 408.650618 256.677741 Tm /f-0-0 1 Tf [(Extends)-3(: if k)33(ein A)17(ccoun)-3(t)]TJ -0.274957 16.187922 Td +ET +1 g +409.594 428.561 39.824 -12.254 re f +0 g +0.433407 w +q 1 0 0 -1 0 595.275574 cm +409.594 166.715 39.824 12.254 re S Q +BT +10 0 0 10 411.068086 418.705471 Tm +/f-0-0 1 Tf [(Include)]TJ -0 10 -10 0 311.264778 475.588688 Tm +ET +1 g +300.859 513.604 14.004 -40.035 re f +0 g +0.404328 w +q 1 0 0 -1 0 595.275574 cm +300.859 81.672 14.004 40.035 re S Q +BT +0 10 -10 0 311.588486 475.147969 Tm +/f-0-0 1 Tf [(Include)]TJ ET Q Q diff --git a/docs/diagrammes/use_case.svg b/docs/diagrammes/use_case.svg index a191907..1457fe5 100644 --- a/docs/diagrammes/use_case.svg +++ b/docs/diagrammes/use_case.svg @@ -69,19 +69,25 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.77151806" - inkscape:cx="442.13457" - inkscape:cy="509.17655" + inkscape:zoom="2.1821826" + inkscape:cx="934.11282" + inkscape:cy="540.08744" inkscape:document-units="mm" - inkscape:current-layer="layer3" - showgrid="false" + inkscape:current-layer="layer2" + showgrid="true" inkscape:window-width="1920" inkscape:window-height="1035" inkscape:window-x="1680" inkscape:window-y="45" inkscape:window-maximized="0" showguides="true" - inkscape:guide-bbox="true" /> + inkscape:guide-bbox="true" + inkscape:snap-global="true" + inkscape:snap-object-midpoints="false"> + + @@ -90,7 +96,7 @@ image/svg+xml - + @@ -111,8 +117,7 @@ + inkscape:label="actor"> + style="display:inline" + sodipodi:insensitive="true"> + id="g4626"> Artikel durchstöbern + id="g4798"> Artikel verwalten + id="g4806"> User verwalten + id="g4634"> Registration + id="g4612"> Login + id="g4846"> Checkout - - Artikel in - Warenkorb legen + id="g4823"> + + + + Artikel in + Warenkorb legen + + + inkscape:connector-curvature="0" /> + inkscape:connector-curvature="0" /> + inkscape:connector-curvature="0" /> + inkscape:connector-curvature="0" /> + inkscape:connector-curvature="0" /> + inkscape:connection-start="#g236" /> + inkscape:connector-curvature="0" /> - - - + inkscape:connector-curvature="0" /> - Extends: if kein Account - Include - Include - - From fd031925e421735ac7891fadfa182a17f5be0c03 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 8 Jan 2018 21:08:34 +0100 Subject: [PATCH 47/53] list all the references without actually citing them --- docs/main.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/main.tex b/docs/main.tex index fc4d506..09fbd80 100644 --- a/docs/main.tex +++ b/docs/main.tex @@ -33,6 +33,7 @@ aufzeigen kann. \include{doku} \newpage +\nocite{*} \printbibliography[heading=bibintoc] \newpage From ff86d936604684cce3b6d7c1d74c174973489dcc Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 8 Jan 2018 21:09:15 +0100 Subject: [PATCH 48/53] add the django book to the references --- docs/andreas.bib | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/andreas.bib b/docs/andreas.bib index 218216b..96bd885 100644 --- a/docs/andreas.bib +++ b/docs/andreas.bib @@ -7,3 +7,12 @@ year = {2018}, } +@book{djangobook, + publisher = {{leanpub.com}}, + Url = {{https://djangobook.com/}}, + Urldate = {{2018-01-08}}, + author = {Nigel George}, + title = {{Mastering Django: Core}}, + year = {2016}, +} + From 6290eb7a6a47b1f505b6f4758c3d1a767efdc418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Wed, 10 Jan 2018 00:58:34 +0100 Subject: [PATCH 49/53] corrected currencies app and added different view. --- .../didgeridoo/currencies/exchange_rates.py | 43 ++-- .../currencies/migrations/0001_initial.py | 30 ++- .../migrations/0002_exchangerate_date.py | 20 -- .../migrations/0003_auto_20171227_1119.py | 20 -- .../migrations/0004_auto_20171229_1708.py | 20 -- .../migrations/0005_auto_20171229_1735.py | 20 -- .../migrations/0006_auto_20171229_1747.py | 20 -- .../migrations/0007_auto_20171229_1806.py | 20 -- django/didgeridoo/currencies/models.py | 6 +- .../templates/currencies/index.html | 180 +++++++------- django/didgeridoo/currencies/views.py | 229 +++++++++++------- django/didgeridoo/didgeridoo/settings.py | 2 +- django/didgeridoo/rss | 8 +- 13 files changed, 299 insertions(+), 319 deletions(-) delete mode 100644 django/didgeridoo/currencies/migrations/0002_exchangerate_date.py delete mode 100644 django/didgeridoo/currencies/migrations/0003_auto_20171227_1119.py delete mode 100644 django/didgeridoo/currencies/migrations/0004_auto_20171229_1708.py delete mode 100644 django/didgeridoo/currencies/migrations/0005_auto_20171229_1735.py delete mode 100644 django/didgeridoo/currencies/migrations/0006_auto_20171229_1747.py delete mode 100644 django/didgeridoo/currencies/migrations/0007_auto_20171229_1806.py diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py index bbc50a6..df33d6e 100644 --- a/django/didgeridoo/currencies/exchange_rates.py +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -18,19 +18,26 @@ def get_exchange_rate(): # To develop i need a testresource. # In that case i comment the Online Resource block and uncomment the # development Block... + # ~~~~~~~~~~~~~~~~~~~~~ # Online Resource block: # ~~~~~~~~~~~~~~~~~~~~~ - # SNB_URL = 'https://www.snb.ch/selector/de/mmr/exfeed/rss' - # urlsocket = urllib.request.urlopen(SNB_URL) - # root = ET.parse(urlsocket) - # root = ET.ElementTree(root) - # today = datetime.now().strftime("%Y-%m-%d") + today = datetime.now().strftime("%Y-%m-%d") + SNB_URL = 'https://www.snb.ch/selector/de/mmr/exfeed/rss' + urlsocket = urllib.request.urlopen(SNB_URL) + root = ET.parse(urlsocket) + root = ET.ElementTree(root) + # ~~~~~~~~~~~~~~~~~~~~~ # development block: # ~~~~~~~~~~~~~~~~~~~~~ - root = ET.ElementTree(file='rss') - today = "2018-01-01" + # today = "2018-01-03" + # try: + # root = ET.ElementTree(file='rss') + # except Exception as e: + # print('exchange_rates.py_urlsocket failed %s ( + # %s) on date: %s for %s' + # % (e, type(e), root)) # ~~~~~~~~~~~~~~~~~~~~~ # Namespaces @@ -43,9 +50,7 @@ def get_exchange_rate(): # Pathvariables to XML Namespaces rate_path = 'cb:statistics/cb:exchangeRate/' observation_path = 'cb:statistics/cb:exchangeRate/cb:observation/' - exchange_rates = {} - for item in root.findall('none:item', ns): # THE CURRENCY DATE: datetime_str = item.find('dc:date', ns).text @@ -53,20 +58,19 @@ def get_exchange_rate(): # https://stackoverflow.com/a/12282040/4061870 # seams like snb striked the microsecond somewhere between Nov. and # Dez. 2017 so maybe first check time type is with milliseconds: - try: - date = datetime.strptime(''.join( - datetime_str.rsplit(':', 1)), - "%Y-%m-%dT%H:%M:%S.%f%z").strftime( - "%Y-%m-%d") - except Exception as e: - print('%s (%s)' % (e, type(e))) try: date = datetime.strptime(''.join( datetime_str.rsplit(':', 1)), "%Y-%m-%dT%H:%M:%S%z").strftime( "%Y-%m-%d") - except Exception as e: - print('%s (%s)' % (e, type(e))) + except: + try: + date = datetime.strptime(''.join( + datetime_str.rsplit(':', 1)), + "%Y-%m-%dT%H:%M:%S.%f%z").strftime( + "%Y-%m-%d") + except Exception as e: + print('%s (%s)' % (e, type(e))) # Print dates for development: # print("date:", date, "today:", today) # only the values of today are used so check for date in XML: @@ -122,7 +126,8 @@ def get_exchange_rate(): # Print the Dictionary: # print(exchange_rates) else: - break + exchange_rates = "SNB did not update the currencies for today." return(exchange_rates, today) + # for development its preferable to see that the for loop is done: # print('no more fresh data!') diff --git a/django/didgeridoo/currencies/migrations/0001_initial.py b/django/didgeridoo/currencies/migrations/0001_initial.py index c7f74a7..ee9f2f4 100644 --- a/django/didgeridoo/currencies/migrations/0001_initial.py +++ b/django/didgeridoo/currencies/migrations/0001_initial.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.10.7 on 2017-12-18 18:01 +# Generated by Django 1.10.7 on 2018-01-09 18:21 from __future__ import unicode_literals from django.db import migrations, models +import django.db.models.deletion class Migration(migrations.Migration): @@ -17,8 +18,31 @@ class Migration(migrations.Migration): name='ExchangeRate', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200, unique=True)), - ('exchange_rate_to_chf', models.FloatField(max_length=5)), + ('exchange_rate_to_chf', models.DecimalField(decimal_places=5, max_digits=12)), ], ), + migrations.CreateModel( + name='ExchangeRate_date', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateField(unique_for_date=True, verbose_name='%Y-%m-%d')), + ], + ), + migrations.CreateModel( + name='ExchangeRate_name', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200, unique=True)), + ], + ), + migrations.AddField( + model_name='exchangerate', + name='date', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='currencies.ExchangeRate_date'), + ), + migrations.AddField( + model_name='exchangerate', + name='name', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='currencies.ExchangeRate_name'), + ), ] diff --git a/django/didgeridoo/currencies/migrations/0002_exchangerate_date.py b/django/didgeridoo/currencies/migrations/0002_exchangerate_date.py deleted file mode 100644 index 37fb831..0000000 --- a/django/didgeridoo/currencies/migrations/0002_exchangerate_date.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.7 on 2017-12-27 10:05 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('currencies', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='exchangerate', - name='date', - field=models.DateField(null=True), - ), - ] diff --git a/django/didgeridoo/currencies/migrations/0003_auto_20171227_1119.py b/django/didgeridoo/currencies/migrations/0003_auto_20171227_1119.py deleted file mode 100644 index c6283a2..0000000 --- a/django/didgeridoo/currencies/migrations/0003_auto_20171227_1119.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.7 on 2017-12-27 10:19 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('currencies', '0002_exchangerate_date'), - ] - - operations = [ - migrations.AlterField( - model_name='exchangerate', - name='date', - field=models.DateField(null=True, verbose_name='%Y-%m-%d'), - ), - ] diff --git a/django/didgeridoo/currencies/migrations/0004_auto_20171229_1708.py b/django/didgeridoo/currencies/migrations/0004_auto_20171229_1708.py deleted file mode 100644 index ad84626..0000000 --- a/django/didgeridoo/currencies/migrations/0004_auto_20171229_1708.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.7 on 2017-12-29 16:08 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('currencies', '0003_auto_20171227_1119'), - ] - - operations = [ - migrations.AlterField( - model_name='exchangerate', - name='name', - field=models.CharField(max_length=200), - ), - ] diff --git a/django/didgeridoo/currencies/migrations/0005_auto_20171229_1735.py b/django/didgeridoo/currencies/migrations/0005_auto_20171229_1735.py deleted file mode 100644 index 3ac6227..0000000 --- a/django/didgeridoo/currencies/migrations/0005_auto_20171229_1735.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.7 on 2017-12-29 16:35 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('currencies', '0004_auto_20171229_1708'), - ] - - operations = [ - migrations.AlterField( - model_name='exchangerate', - name='date', - field=models.DateField(null=True, verbose_name='%Y-%m-%dT%H:%M:%S'), - ), - ] diff --git a/django/didgeridoo/currencies/migrations/0006_auto_20171229_1747.py b/django/didgeridoo/currencies/migrations/0006_auto_20171229_1747.py deleted file mode 100644 index a2a330b..0000000 --- a/django/didgeridoo/currencies/migrations/0006_auto_20171229_1747.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.7 on 2017-12-29 16:47 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('currencies', '0005_auto_20171229_1735'), - ] - - operations = [ - migrations.AlterField( - model_name='exchangerate', - name='date', - field=models.DateTimeField(null=True, verbose_name='%Y-%m-%dT%H:%M:%S'), - ), - ] diff --git a/django/didgeridoo/currencies/migrations/0007_auto_20171229_1806.py b/django/didgeridoo/currencies/migrations/0007_auto_20171229_1806.py deleted file mode 100644 index 2455467..0000000 --- a/django/didgeridoo/currencies/migrations/0007_auto_20171229_1806.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.7 on 2017-12-29 17:06 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('currencies', '0006_auto_20171229_1747'), - ] - - operations = [ - migrations.AlterField( - model_name='exchangerate', - name='date', - field=models.DateField(null=True, verbose_name='%Y-%m-%d'), - ), - ] diff --git a/django/didgeridoo/currencies/models.py b/django/didgeridoo/currencies/models.py index e9fe0e7..73a09ba 100644 --- a/django/didgeridoo/currencies/models.py +++ b/django/didgeridoo/currencies/models.py @@ -1,4 +1,6 @@ from django.db import models +from decimal import Decimal +import datetime class ExchangeRate_name(models.Model): @@ -18,7 +20,7 @@ class ExchangeRate_date(models.Model): class ExchangeRate(models.Model): name = models.ForeignKey(ExchangeRate_name) date = models.ForeignKey(ExchangeRate_date) - exchange_rate_to_chf = models.FloatField(max_length=5) + exchange_rate_to_chf = models.DecimalField(max_digits=12, decimal_places=5) def __str__(self): - return self.name + return str(self.name) diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html index d466c35..851d38f 100644 --- a/django/didgeridoo/currencies/templates/currencies/index.html +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -3,34 +3,109 @@ -
        -

        Currencies in CHF

        - {% if currency_list %} - + + {% else %} +

        + currency_USD_list missing. +

        + {% endif %} +
        +

        EURO:

        + {% if currency_EUR_list %} + + + {% for element in currency_EUR_list %} + {% for key, value in element.items %} + + {% endfor %} + {% endfor %} + + {% for element in currency_EUR_list %} + + {% for key, value in element.items %} + + {% endfor %} + + {% endfor %} +
        {{ key }}
        {{ value }}
        {% else %}

        - currency_list missing. + currency_EUR_list missing.

        {% endif %}
        -

        {{ message }}

        +

        Japanese Yenn:

        + {% if currency_JPY_list %} + + + {% for element in currency_JPY_list %} + {% for key, value in element.items %} + + {% endfor %} + {% endfor %} + + {% for element in currency_JPY_list %} + + {% for key, value in element.items %} + + {% endfor %} + + {% endfor %} +
        {{ key }}
        {{ value }}
        + {% else %} +

        + currency_JPY_list missing. +

        + {% endif %}
        +

        Great Britain Pounds:

        + {% if currency_GBP_list %} + + + {% for element in currency_GBP_list %} + {% for key, value in element.items %} + + {% endfor %} + {% endfor %} + + {% for element in currency_GBP_list %} + + {% for key, value in element.items %} + + {% endfor %} + + {% endfor %} +
        {{ key }}
        {{ value }}
        + {% else %} +

        + currency_GBP_list missing. +

        + {% endif %} +
        + - raw_data -
          - {% for key, value in raw_data.items %} -
        • - {{ key }} : - {{ value }} -
        • - {% endfor %} -
        -
        - today -
          -
        • - {{ today }} -
        • -
        -
        - unique_dates_list -
          - {% for key in unique_dates_list %} -
        • - {{ key }} -
        • - {% endfor %} -
        -
        - unique_currencies_list -
          - {% for key in unique_currencies_list %} -
        • - {{ key }} -
        • - {% endfor %} -
        -
        count_raw_data -
          -
        • {{ count_raw_data }}
        • -

        - count_currencies -
          -
        • - {{ count_currencies }} -
        • -
        -
        - currencies_list -
          - {% for key in currencies_list.values %} -
        • - {{ key }} -
        • - {% endfor %} -
        - currency_dict -
          - {% for key, value in currency_dict %} -
        • - {{ key }} -
        • -
        • - {{ value }} -
        • - {% endfor %} -
        + {{ count_raw_data }} -->
        diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index 774513a..d4a2f32 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -1,5 +1,8 @@ from django.shortcuts import render -from currencies.models import ExchangeRate, ExchangeRate_date, ExchangeRate_name +import datetime +from currencies.models import (ExchangeRate, + ExchangeRate_date, + ExchangeRate_name) from currencies import exchange_rates @@ -8,109 +11,165 @@ def currencies(request): # evaluates if the values are already stored and # prepares the view all dynamicaly. # It can grow in terms of more Currencies over time automaticaly. + # try: + today = '1970-01-01' + raw_data = '' raw_data, today = exchange_rates.get_exchange_rate() + # except Exception as e: + # print('get_exchange_rate() %s (%s) on %s' + # % (e, type(e), today)) message_no = "Already querried today: " message_yes = " Updated successfully: " count_raw_data = 0 - for currency, rate in raw_data.items(): - count_raw_data += 1 - if ExchangeRate_date.objects.filter(date__date=today) \ - and ExchangeRate_name.objects.get(name=currency): - message_no += currency + ", " - # A: https://stackoverflow.com/a/27802801/4061870 - else: - if ExchangeRate_date.objects.filter(date=today)[:1]: - try: - date_dict = ExchangeRate_date.objects.filter(date=today).values() - date = date_dict[0]['date'] - date_id = date_dict[0]['id'] - except Exception as e: - print('date_dict %s (%s)' % (e, type(e))) - else: - try: - exdate = ExchangeRate_date.objects.create(date=today) - exdate.save() - except Exception as e: - print('exdate %s (%s)' % (e, type(e))) - if ExchangeRate_name.objects.filter(name=currency)[:1]: - try: - name_dict = ExchangeRate_name.objects.get(name=currency) - name = name_dict[0]['name'] - name_id = name_dict[0]['id'] - except Exception as e: - print('exdate %s (%s)' % (e, type(e))) - else: - try: - exname = ExchangeRate_name.objects.create(name=currency) - exname.save() - except Exception as e: - print('exname %s (%s)' % (e, type(e))) - try: - exrate = ExchangeRate.objects.create( - # name_id=name_id, - name_id=ExchangeRate_name.objects.only('id').get(name=currency).id, - # date_id=date_id, - date_id=ExchangeRate_date.objects.only('id').get(date=today).id, - exchange_rate_to_chf=rate, - ) - exrate.save() - message_yes += currency + ", " - - except Exception as e: - print('exrate %s (%s)' % (e, type(e))) - - # prepare messages: - message_no = message_no[::-1] # invert the string - message_no = message_no.replace(",", "!", 1) # replace first , with ! - message_no = message_no[::-1] # invert the string back - message_yes = message_yes[::-1] # invert the string - message_yes = message_yes.replace(",", "!", 1) # replace first , with ! - message_yes = message_yes[::-1] # invert the string back - - if len(message_no) > 24 and len(message_yes) > 23: - message = message_no + message_yes - elif len(message_no) > 24: - message = message_no - elif len(message_yes) > 23: - message = message_yes + if raw_data == "SNB did not update the currencies for today.": + message = """Die SNB hat die Währungsliste noch nicht aktualisiert.""" else: - message = "something whent wrong" + for currency, rate in raw_data.items(): + count_raw_data += 1 + if ExchangeRate.objects.filter( + date__date=today, + name__name=currency): + message_no += currency + ", " + # A: https://stackoverflow.com/a/27802801/4061870 + else: + if ExchangeRate_date.objects.filter(date=today)[:1]: + try: + # lustigerweise gibt .values() den value und den id + # zurück. Ohne .values() gibts nur den "value" + date_dict = ExchangeRate_date.objects.filter( + date=today).values() + date = date_dict[0]['date'] + date_id = date_dict[0]['id'] + except Exception as e: + print('exdate_exists %s (%s) on %s' + % (e, type(e), today)) + else: + try: + exdate = ExchangeRate_date.objects.create( + date=today) + exdate.save() + except Exception as e: + print('exdate_not_exists %s (%s) for %s' + % (e, type(e), today)) + if ExchangeRate_name.objects.filter( + name=currency)[:1]: + try: + name_dict = ExchangeRate_name.objects.filter( + name=currency).values() + name = name_dict[0]['name'] + name_id = name_dict[0]['id'] + except Exception as e: + print('exname_exists %s (%s) on %s' + % (e, type(e), currency)) + else: + try: + exname = ExchangeRate_name.objects.create( + name=currency) + exname.save() + except Exception as e: + print('exname_not_exists %s (%s) on %s' + % (e, type(e), currency)) + try: + exrate = ExchangeRate.objects.create( + # name_id=name_id, + name_id=ExchangeRate_name.objects.get( + name=currency).id, + # date_id=date_id, + date_id=ExchangeRate_date.objects.get( + date=today).id, + exchange_rate_to_chf=rate, + ) + exrate.save() + message_yes += currency + ", " + + except Exception as e: + print('exrate_create %s (%s) on %s for %s' + % (e, type(e), currency, today)) + + # prepare messages: + message_no = message_no[::-1] # invert the string + message_no = message_no.replace(",", "!", 1) # replace first , with ! + message_no = message_no[::-1] # invert the string back + message_yes = message_yes[::-1] # invert the string + message_yes = message_yes.replace(",", "!", 1) # replace first , with ! + message_yes = message_yes[::-1] # invert the string back + + if len(message_no) > 24 and len(message_yes) > 23: + message = message_no + message_yes + elif len(message_no) > 24: + message = message_no + elif len(message_yes) > 23: + message = message_yes + elif datetime.datetime.today().isoweekday() == 6: + message = """Die Abfrage wurde ohne ergebniss beendet. + Es ist Samstag, die SNB publiziert nur an Arbeitstagen neue Kurse... + """ + elif datetime.datetime.today().isoweekday() == 7: + message = """Die Abfrage wurde ohne ergebniss beendet. + Es ist Sonntag, die SNB publiziert nur an Arbeitstagen neue Kurse... + """ + else: + message = """Die Abfrage wurde ohne ergebniss beendet. + Kann es sein dass die SNB aufgrund eines Feiertages geschlossen ist? + """ currency_list = ExchangeRate.objects.all() + currency_USD_list = ExchangeRate.objects.filter(name__name='USD').values() + currency_EUR_list = ExchangeRate.objects.filter(name__name='EUR').values() + currency_JPY_list = ExchangeRate.objects.filter(name__name='JPY').values() + currency_GBP_list = ExchangeRate.objects.filter(name__name='GBP').values() + # ------------------------------------------------------------------- + # ------------------------------------------------------------------- + # I leave this part in the document as history. + # Problem is that i get the expected List with dictionaries like: + # view_currencies_list[ + # {'date': '2017-12-29, 'USD':'1.00', 'EUR':'1.00', 'GBP':'1.00', 'JPY':'1.00'}, + # {'date': '2017-12-30, 'USD':'1.00', 'EUR':'1.00', 'GBP':'1.00', 'JPY':'1.00'}, + # ] + # but the dict of 'date:' does not seam to deliver the same values as + # the dict's of key name:'USD' im not able to fix this in moment. + # nor am i able to generate a HTML table with date | USD | EUR | ... + # ------------------------------------------------------------------- + # ------------------------------------------------------------------- # prepare data to be displayed in a html table: # https://stackoverflow.com/questions/8749158/removing-duplicates-from-dictionary#8749473 - # atomar_dates # A: https://stackoverflow.com/questions/37205793/django-values-list-vs-values#37205928 # B: https://stackoverflow.com/questions/6521892/how-to-access-a-dictionary-key-value-present-inside-a-list - # dates_list = ExchangeRate_date.objects.values_list('date', flat=True) - # # atomar_currenies - # currencies_list = ExchangeRate_name.objects.values_list('name', flat=True) # # search for currencies in a date and apend them to the list - # currency_list = [] + # view_currency_list = [] + # view_currencies_list = ExchangeRate_name.objects.all() + # view_dates_list = ExchangeRate_date.objects.all() # count_date = 0 # count_currencies = 0 - # for date in dates_list: + # for view_date in view_dates_list: # count_date += 1 - # currency_dict = {} - # currency_dict['date'] = date - # for currency in currencies_list: + # view_currency_dict = {view_date} + # # view_currency_dict.update({}) + # for view_currency in view_currencies_list: # count_currencies += 1 # try: - # temp = ExchangeRate.objects.objects.only('exchange_rate_to_chf').get(name=currency).id - # #temp = ExchangeRate.objects.filter(date=unique_date, name=currency).values() # A - # exchange_rate_to_chf = temp[0]['exchange_rate_to_chf'] - # currency_dict = currency_dict.update({currency: exchange_rate_to_chf}) # B + # x = ExchangeRate.objects.filter(date__date=str( + # view_date), + # name__name=str( + # view_currency + # )).values() # A + # view_exchange_rate_to_chf = x[0]['exchange_rate_to_chf'] # except Exception as e: - # print('%s (%s)' % (e, type(e))) - # currency_list.append(currency_dict) - # assert False + # print('prepare_view %s (%s) for %s on %s is %s' + # % (e, type(e), view_currency, view_date, + # view_exchange_rate_to_chf)) + # view_exchange_rate_to_chf = " " + # + # view_currency_dict.update({view_currency: + # view_exchange_rate_to_chf}) # B + # + # view_currency_list.append(view_currency_dict) + # assert False return render(request, 'currencies/index.html', {'currency_list': currency_list, - 'raw_data': raw_data, - 'today': today, - # 'unique_dates_list': unique_dates_list, - # 'unique_currencies_list': unique_currencies_list, + 'currency_USD_list': currency_USD_list, + 'currency_EUR_list': currency_EUR_list, + 'currency_JPY_list': currency_JPY_list, + 'currency_GBP_list': currency_GBP_list, 'count_raw_data': count_raw_data, - # 'count_currencies': count_currencies, - # 'currency_dict': currency_dict, 'message': message}) diff --git a/django/didgeridoo/didgeridoo/settings.py b/django/didgeridoo/didgeridoo/settings.py index 405c1de..71b26b2 100644 --- a/django/didgeridoo/didgeridoo/settings.py +++ b/django/didgeridoo/didgeridoo/settings.py @@ -35,6 +35,7 @@ ALLOWED_HOSTS = [ # Application definition INSTALLED_APPS = [ + 'currencies', 'webshop.apps.WebshopConfig', 'django_extensions', 'django.contrib.admin', @@ -43,7 +44,6 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'currencies', ] MIDDLEWARE = [ diff --git a/django/didgeridoo/rss b/django/didgeridoo/rss index b1dc21a..b6be892 100644 --- a/django/didgeridoo/rss +++ b/django/didgeridoo/rss @@ -37,7 +37,7 @@ CH: 1.3081 CHF = 1 GBP 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 1 GBP = 1.3081 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.767+01:00) - 2018-01-01T12:16:53.767+01:00 + 2018-01-03T12:16:53.767+01:00 de @@ -66,7 +66,7 @@ CH: 0.8813 CHF = 100 JPY 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 100 JPY = 0.8813 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.760+01:00) - 2018-01-01T12:16:53.760+01:00 + 2018-01-03T12:16:53.760+01:00 de @@ -96,7 +96,7 @@ CH: 1.1697 CHF = 1 EUR 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 1 EUR = 1.1697 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.750+01:00) - 2018-01-01T12:16:53.750+01:00 + 2018-01-03T12:16:53.750+01:00 de @@ -125,7 +125,7 @@ CH: 0.9803 CHF = 1 USD 2017-11-27 Tägliche Kurse (11:00) https://www.snb.ch 1 USD = 0.9803 CHF (Tägliche Kurse (11:00); 2017-11-27T12:16:53.737+01:00) - 2018-01-01T12:16:53.737+01:00 + 2018-01-03T12:16:53.737+01:00 de From aca21b43532f647a57f196fe94b732526bcd4694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Wed, 10 Jan 2018 22:43:22 +0100 Subject: [PATCH 50/53] changed view and catched a bug in currencies.views.py --- .../didgeridoo/currencies/exchange_rates.py | 13 ++- .../templates/currencies/index.html | 100 ++++++++---------- django/didgeridoo/currencies/views.py | 27 ++--- 3 files changed, 66 insertions(+), 74 deletions(-) diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py index df33d6e..a68ca2f 100644 --- a/django/didgeridoo/currencies/exchange_rates.py +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -1,8 +1,6 @@ from datetime import datetime import urllib.request import xml.etree.ElementTree as ET -import datetime as dt - """ this method calls a rss/XML Resource @@ -14,6 +12,8 @@ Key:Value pairs of new currencys. def get_exchange_rate(): + # zweitweise kann die resource nicht geladen werden. + # https://stackoverflow.com/a/43523497/4061870 # During weekends there are no updates. # To develop i need a testresource. # In that case i comment the Online Resource block and uncomment the @@ -22,6 +22,7 @@ def get_exchange_rate(): # ~~~~~~~~~~~~~~~~~~~~~ # Online Resource block: # ~~~~~~~~~~~~~~~~~~~~~ + error = "SNB did not update the currencies for today." today = datetime.now().strftime("%Y-%m-%d") SNB_URL = 'https://www.snb.ch/selector/de/mmr/exfeed/rss' urlsocket = urllib.request.urlopen(SNB_URL) @@ -63,14 +64,17 @@ def get_exchange_rate(): datetime_str.rsplit(':', 1)), "%Y-%m-%dT%H:%M:%S%z").strftime( "%Y-%m-%d") - except: + except Exception as e: + print('%s (%s)' % (e, type(e))) try: date = datetime.strptime(''.join( datetime_str.rsplit(':', 1)), "%Y-%m-%dT%H:%M:%S.%f%z").strftime( "%Y-%m-%d") + continue except Exception as e: print('%s (%s)' % (e, type(e))) + continue # Print dates for development: # print("date:", date, "today:", today) # only the values of today are used so check for date in XML: @@ -126,7 +130,8 @@ def get_exchange_rate(): # Print the Dictionary: # print(exchange_rates) else: - exchange_rates = "SNB did not update the currencies for today." + exchange_rates = error + assert False return(exchange_rates, today) # for development its preferable to see that the for loop is done: diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html index 851d38f..9f228a4 100644 --- a/django/didgeridoo/currencies/templates/currencies/index.html +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -12,19 +12,15 @@ {% if currency_USD_list %} - {% for element in currency_USD_list %} - {% for key, value in element.items %} - - {% endfor %} + + + + {% for currency in currency_USD_list %} + + + {% endfor %} - {% for element in currency_USD_list %} - - {% for key, value in element.items %} - - {% endfor %} - - {% endfor %}
        {{ key }}DATERATE
        {{ currency.date.date }}{{ currency.exchange_rate_to_chf }}
        {{ value }}
        {% else %}

        @@ -34,22 +30,18 @@

        EURO:

        {% if currency_EUR_list %} - - - {% for element in currency_EUR_list %} - {% for key, value in element.items %} - - {% endfor %} - {% endfor %} - - {% for element in currency_EUR_list %} - - {% for key, value in element.items %} - - {% endfor %} - +
        {{ key }}
        {{ value }}
        + + + + + {% for currency in currency_EUR_list %} + + + {% endfor %} -
        DATERATE
        {{ currency.date.date }}{{ currency.exchange_rate_to_chf }}
        + + {% else %}

        currency_EUR_list missing. @@ -58,22 +50,18 @@

        Japanese Yenn:

        {% if currency_JPY_list %} - - - {% for element in currency_JPY_list %} - {% for key, value in element.items %} - - {% endfor %} - {% endfor %} - - {% for element in currency_JPY_list %} - - {% for key, value in element.items %} - - {% endfor %} - +
        {{ key }}
        {{ value }}
        + + + + + {% for currency in currency_JPY_list %} + + + {% endfor %} -
        DATERATE
        {{ currency.date.date }}{{ currency.exchange_rate_to_chf }}
        + + {% else %}

        currency_JPY_list missing. @@ -82,29 +70,25 @@

        Great Britain Pounds:

        {% if currency_GBP_list %} - - - {% for element in currency_GBP_list %} - {% for key, value in element.items %} - - {% endfor %} - {% endfor %} - - {% for element in currency_GBP_list %} - - {% for key, value in element.items %} - - {% endfor %} - +
        {{ key }}
        {{ value }}
        + + + + + {% for currency in currency_GBP_list %} + + + {% endfor %} -
        DATERATE
        {{ currency.date.date }}{{ currency.exchange_rate_to_chf }}
        + + {% else %}

        currency_GBP_list missing.

        {% endif %} -
        -
        diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index cdb4e7c..b4a6fe9 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -11,110 +11,100 @@ def currencies(request): # evaluates if the values are already stored and # prepares the view all dynamicaly. # It can grow in terms of more Currencies over time automaticaly. - # try: today = '' raw_data = '' raw_data, today = exchange_rates.get_exchange_rate() - # except Exception as e: - # print('get_exchange_rate() %s (%s) on %s' - # % (e, type(e), today)) + print('views raw_data: ', raw_data) # assert False message_no = "Already querried today: " message_yes = " Updated successfully: " - count_raw_data = 0 - if raw_data != "SNB did not update the currencies for today.": - for currency, rate in raw_data.items(): - count_raw_data += 1 - if ExchangeRate.objects.filter( - date__date=today, - name__name=currency): - message_no += currency + ", " - # A: https://stackoverflow.com/a/27802801/4061870 - else: - if ExchangeRate_date.objects.filter(date=today)[:1]: - try: - # lustigerweise gibt .values() den value und den id - # zurück. Ohne .values() gibts nur den "value" - date_dict = ExchangeRate_date.objects.filter( - date=today).values() - date = date_dict[0]['date'] - date_id = date_dict[0]['id'] - except Exception as e: - print('exdate_exists %s (%s) on %s' - % (e, type(e), today)) - else: - try: - exdate = ExchangeRate_date.objects.create( - date=today) - exdate.save() - except Exception as e: - print('exdate_not_exists %s (%s) for %s' - % (e, type(e), today)) - if ExchangeRate_name.objects.filter( - name=currency)[:1]: - try: - name_dict = ExchangeRate_name.objects.filter( - name=currency).values() - name = name_dict[0]['name'] - name_id = name_dict[0]['id'] - except Exception as e: - print('exname_exists %s (%s) on %s' - % (e, type(e), currency)) - else: - try: - exname = ExchangeRate_name.objects.create( - name=currency) - exname.save() - except Exception as e: - print('exname_not_exists %s (%s) on %s' - % (e, type(e), currency)) - try: - exrate = ExchangeRate.objects.create( - # name_id=name_id, - name_id=ExchangeRate_name.objects.get( - name=currency).id, - # date_id=date_id, - date_id=ExchangeRate_date.objects.get( - date=today).id, - exchange_rate_to_chf=rate, - ) - exrate.save() - message_yes += currency + ", " - - except Exception as e: - print('exrate_create %s (%s) on %s for %s' - % (e, type(e), currency, today)) - - # prepare messages: - message_no = message_no[::-1] # invert the string - message_no = message_no.replace(",", "!", 1) # replace first , with ! - message_no = message_no[::-1] # invert the string back - message_yes = message_yes[::-1] # invert the string - message_yes = message_yes.replace(",", "!", 1) # replace f. , with ! - message_yes = message_yes[::-1] # invert the string back - - if len(message_no) > 24 and len(message_yes) > 23: - message = message_no + message_yes - elif len(message_no) > 24: - message = message_no - elif len(message_yes) > 23: - message = message_yes - elif datetime.datetime.today().isoweekday() == 6: - message = """Die Abfrage wurde ohne ergebniss beendet. - Es ist Samstag, die SNB publiziert nur an Arbeitstagen - neue Kurse... - """ - elif datetime.datetime.today().isoweekday() == 7: - message = """Die Abfrage wurde ohne ergebniss beendet. - Es ist Sonntag, die SNB publiziert nur an Arbeitstagen - neue Kurse... - """ + for currency, rate in raw_data.items(): + if ExchangeRate.objects.filter( + date__date=today, + name__name=currency): + message_no += currency + ", " + # A: https://stackoverflow.com/a/27802801/4061870 else: - message = """Die Abfrage wurde ohne ergebniss beendet. - Kann es sein dass die SNB aufgrund eines Feiertages - geschlossen ist? - """ + if ExchangeRate_date.objects.filter(date=today)[:1]: + try: + # lustigerweise gibt .values() den value und die id + # zurück. Ohne .values() gibts nur den "value" + date_dict = ExchangeRate_date.objects.filter( + date=today).values() + except Exception as e: + print('exdate_exists %s (%s) on %s' + % (e, type(e), today)) + else: + try: + exdate = ExchangeRate_date.objects.create( + date=today) + exdate.save() + except Exception as e: + print('exdate_not_exists %s (%s) for %s' + % (e, type(e), today)) + if ExchangeRate_name.objects.filter( + name=currency)[:1]: + try: + name_dict = ExchangeRate_name.objects.filter( + name=currency).values() + except Exception as e: + print('exname_exists %s (%s) on %s' + % (e, type(e), currency)) + else: + try: + exname = ExchangeRate_name.objects.create( + name=currency) + exname.save() + except Exception as e: + print('exname_not_exists %s (%s) on %s' + % (e, type(e), currency)) + try: + exrate = ExchangeRate.objects.create( + # name_id=name_id, + name_id=ExchangeRate_name.objects.get( + name=currency).id, + # date_id=date_id, + date_id=ExchangeRate_date.objects.get( + date=today).id, + exchange_rate_to_chf=rate, + ) + exrate.save() + message_yes += currency + ", " + + except Exception as e: + print('exrate_create %s (%s) on %s for %s' + % (e, type(e), currency, today)) + + # prepare messages: + # python can not swap a char insinde a sting so i have + # to invert and swap and then invert back: + message_no = message_no[::-1] # invert the string + message_no = message_no.replace(",", "!", 1) # replace first , with ! + message_no = message_no[::-1] # invert the string back + message_yes = message_yes[::-1] # invert the string + message_yes = message_yes.replace(",", "!", 1) # replace f. , with ! + message_yes = message_yes[::-1] # invert the string back + + if len(message_no) > 24 and len(message_yes) > 23: + message = message_no + message_yes + elif len(message_no) > 24: + message = message_no + elif len(message_yes) > 23: + message = message_yes + elif datetime.datetime.today().isoweekday() == 6: + message = """Die Abfrage wurde ohne ergebniss beendet. + Es ist Samstag, die SNB publiziert nur an Arbeitstagen + neue Kurse... + """ + elif datetime.datetime.today().isoweekday() == 7: + message = """Die Abfrage wurde ohne ergebniss beendet. + Es ist Sonntag, die SNB publiziert nur an Arbeitstagen + neue Kurse... + """ else: - message = "Die SNB hat die Währungsliste noch nicht aktualisiert." + message = """Die Abfrage wurde ohne ergebniss beendet. + Kann es sein dass die SNB aufgrund eines Feiertages + geschlossen ist? + """ currency_list = ExchangeRate.objects.all() currency_USD_list = ExchangeRate.objects.filter(name__name='USD') currency_EUR_list = ExchangeRate.objects.filter(name__name='EUR') @@ -174,5 +164,4 @@ def currencies(request): 'currency_EUR_list': currency_EUR_list, 'currency_JPY_list': currency_JPY_list, 'currency_GBP_list': currency_GBP_list, - 'count_raw_data': count_raw_data, 'message': message}) From 59a128b448a0272c3e514c9d2b026cdb1203096c Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Thu, 11 Jan 2018 17:59:38 +0100 Subject: [PATCH 52/53] extend the use case diagramm --- docs/diagrammes/use_case.eps | 719 +++++++++++++++++++++-------------- docs/diagrammes/use_case.svg | 466 +++++++++++++++++------ 2 files changed, 786 insertions(+), 399 deletions(-) diff --git a/docs/diagrammes/use_case.eps b/docs/diagrammes/use_case.eps index 3bf4eb1..19428bc 100644 --- a/docs/diagrammes/use_case.eps +++ b/docs/diagrammes/use_case.eps @@ -1,6 +1,6 @@ %!PS-Adobe-3.0 EPSF-3.0 %%Creator: cairo 1.14.10 (http://cairographics.org) -%%CreationDate: Sun Jan 7 23:14:00 2018 +%%CreationDate: Thu Jan 11 17:59:04 2018 %%Pages: 1 %%DocumentData: Clean7Bit %%LanguageLevel: 2 @@ -75,12 +75,15 @@ save Encoding 32 /space put Encoding 58 /colon put Encoding 65 /A put +Encoding 66 /B put Encoding 67 /C put Encoding 69 /E put Encoding 73 /I put Encoding 75 /K put Encoding 76 /L put +Encoding 78 /N put Encoding 82 /R put +Encoding 83 /S put Encoding 85 /U put Encoding 86 /V put Encoding 87 /W put @@ -104,8 +107,9 @@ Encoding 117 /u put Encoding 118 /v put Encoding 119 /w put Encoding 120 /x put +Encoding 228 /adieresis put Encoding 246 /odieresis put -/CharStrings 34 dict dup begin +/CharStrings 38 dict dup begin /.notdef 0 def /K 1 def /u 2 def @@ -116,36 +120,40 @@ Encoding 246 /odieresis put /t 7 def /r 8 def /s 9 def -/V 10 def -/w 11 def -/a 12 def -/l 13 def -/g 14 def -/A 15 def -/i 16 def -/k 17 def -/c 18 def -/h 19 def -/odieresis 20 def -/b 21 def -/space 22 def -/v 23 def -/U 24 def -/R 25 def -/o 26 def -/L 27 def -/C 28 def -/W 29 def -/E 30 def -/x 31 def -/colon 32 def -/f 33 def +/S 10 def +/N 11 def +/B 12 def +/V 13 def +/w 14 def +/a 15 def +/l 16 def +/g 17 def +/A 18 def +/i 19 def +/k 20 def +/c 21 def +/h 22 def +/odieresis 23 def +/b 24 def +/space 25 def +/v 26 def +/U 27 def +/R 28 def +/o 29 def +/L 30 def +/C 31 def +/W 32 def +/E 33 def +/x 34 def +/colon 35 def +/f 36 def +/adieresis 37 def end readonly def /sfnts [ -<0001000000090080000300106376742000691d39000019b4000001fe6670676d7134766a0000 -1bb4000000ab676c79661d178e5d0000009c00001918686561640d1447cc00001c6000000036 -686865610d9f079000001c9800000024686d74789ff8123900001cbc0000008c6c6f63610001 -c11800001d48000000906d6178700490067100001dd800000020707265703b07f10000001df8 +<0001000000090080000300106376742000691d3900001c3c000001fe6670676d7134766a0000 +1e3c000000ab676c7966cd9418d80000009c00001ba0686561640d1447cc00001ee800000036 +686865610d9f079400001f2000000024686d7478b56c14cd00001f440000009c6c6f63610002 +2e2800001fe0000000a06d617870049406710000208000000020707265703b07f100000020a0 0000056800020066fe96046605a400030007001a400c04fb0006fb0108057f0204002fc4d4ec 310010d4ecd4ec301311211125211121660400fc73031bfce5fe96070ef8f2720629000100c9 0000056a05d5000a00ef40280811050605071106060503110405040211050504420805020303 @@ -189,198 +197,216 @@ a2b8b83ab17ccbff00ffcb7cb1fdc7a79292a8a89292a703b6025ef9eca86461014401080108 5f297f2980299029a029f029185d005d7101152e012322061514161f011e0115140623222627 351e013332363534262f012e01353436333216038b4ea85a898962943fc4a5f7d85ac36c66c6 61828c65ab40ab98e0ce66b4043fae282854544049210e2a99899cb62323be353559514b5025 -0f2495829eac1e000000000100100000056805d5000600b74027041105060503110203060605 -03110403000100021101010042030401af0006040302000505010710d4c4173931002fec3239 -304b5358071005ed071008ed071008ed071005ed5922b2500801015d406200032a0347044705 -5a037d038303070600070208040906150114021a041a052a0026012602290429052506200838 -00330133023c043c053706480045014502490449054706590056066602690469057a00760176 -02790479057506800898009706295d005d21013309013301024afdc6d301d901dad2fdc705d5 -fb1704e9fa2b00010056000006350460000c01eb404905550605090a0904550a0903550a0b0a -025501020b0b0a061107080705110405080807021103020c000c011100000c420a0502030603 -00bf0b080c0b0a09080605040302010b07000d10d44bb00a544bb011545b4bb012545b4bb013 -545b4bb00b545b58b9000000403859014bb00c544bb00d545b4bb010545b58b90000ffc03859 -cc173931002f3cec32321739304b5358071005ed071008ed071008ed071005ed071008ed0710 -05ed0705ed071008ed59220140ff050216021605220a350a49024905460a400a5b025b05550a -500a6e026e05660a79027f0279057f05870299029805940abc02bc05ce02c703cf051d050209 -0306040b050a080b09040b050c1502190316041a051b081b09140b150c250025012302270321 -0425052206220725082709240a210b230c390336043608390c300e4602480346044004420540 -06400740084409440a440b400e400e560056015602500451055206520750085309540a550b63 -00640165026a0365046a056a066a076e09610b670c6f0e7500750179027d0378047d057a067f -067a077f07780879097f097b0a760b7d0c870288058f0e97009701940293039c049b05980698 -079908402f960c9f0ea600a601a402a403ab04ab05a906a907ab08a40caf0eb502b103bd04bb -05b809bf0ec402c303cc04ca05795d005d13331b01331b013301230b012356b8e6e5d9e6e5b8 -fedbd9f1f2d90460fc96036afc96036afba00396fc6a0002007bffe3042d047b000a002500bc -4027191f0b17090e00a91706b90e1120861fba1cb923b8118c170c001703180d09080b1f0308 -14452610fcecccd4ec323211393931002fc4e4f4fcf4ec10c6ee10ee11391139123930406e30 -1d301e301f3020302130223f27401d401e401f402040214022501d501e501f50205021502250 -277027851d871e871f8720872185229027a027f0271e301e301f30203021401e401f40204021 -501e501f50205021601e601f60206021701e701f70207021801e801f80208021185d015d0122 -061514163332363d01371123350e01232226353436332135342623220607353e0133321602be -dfac816f99b9b8b83fbc88accbfdfb0102a79760b65465be5af3f00233667b6273d9b4294cfd -81aa6661c1a2bdc0127f8b2e2eaa2727fc00000100c100000179061400030022b70097020108 -00460410fcec31002fec30400d10054005500560057005f00506015d13331123c1b8b80614f9 -ec0000020071fe56045a047b000b0028004a4023190c1d0912861316b90f03b92623b827bc09 -b90fbd1a1d261900080c4706121220452910fcc4ecf4ec323231002fc4e4ece4f4c4ec10fed5 -ee1112393930b6602a802aa02a03015d01342623220615141633323617100221222627351e01 -3332363d010e0123220211101233321617353303a2a59594a5a59495a5b8fefefa61ac51519e -52b5b439b27ccefcfcce7cb239b8023dc8dcdcc8c7dcdcebfee2fee91d1eb32c2abdbf5b6362 -013a01030104013a6263aa00000200100000056805d50002000a00c240410011010004050402 -1105050401110a030a0011020003030a0711050406110505040911030a08110a030a42000307 -95010381090509080706040302010009050a0b10d4c4173931002f3ce4d4ec1239304b535807 -1005ed0705ed071005ed0705ed071008ed071005ed071005ed071008ed5922b2200c01015d40 -420f010f020f070f080f005800760070008c000907010802060309041601190256015802500c -67016802780176027c0372047707780887018802800c980299039604175d005d090121013301 -230321032302bcfeee0225fe7be50239d288fd5f88d5050efd1903aefa2b017ffe8100000002 -00c100000179061400030007002b400e06be04b100bc020501080400460810fc3cec3231002f -e4fcec30400b1009400950096009700905015d1333112311331523c1b8b8b8b80460fba00614 -e900000100ba0000049c0614000a00bc40290811050605071106060503110405040211050504 -420805020303bc009709060501040608010800460b10fcec32d4c4113931002f3cece4173930 -4b5358071004ed071005ed071005ed071004ed5922b2100c01015d405f04020a081602270229 -052b0856026602670873027705820289058e08930296059708a3021209050906020b030a0728 -03270428052b062b07400c6803600c8903850489058d068f079a039707aa03a705b607c507d6 -07f703f003f704f0041a5d71005d1333110133090123011123bab90225ebfdae026bf0fdc7b9 -0614fc6901e3fdf4fdac0223fddd00010071ffe303e7047b0019003f401b00860188040e860d -880ab91104b917b8118c1a07120d004814451a10fce432ec310010e4f4ec10fef4ee10f5ee30 -400b0f1b101b801b901ba01b05015d01152e0123220615141633323637150e01232200111000 -21321603e74e9d50b3c6c6b3509d4e4da55dfdfed6012d010655a20435ac2b2be3cdcde32b2b -aa2424013e010e0112013a230000000100ba000004640614001300344019030900030e010687 -0e11b80c970a010208004e0d09080b461410fcec32f4ec31002f3cecf4c4ec1112173930b260 -1501015d0111231134262322061511231133113e013332160464b87c7c95acb9b942b375c1c6 -02a4fd5c029e9f9ebea4fd870614fd9e6564ef00ffff0071ffe3047506101226001a00001106 -002273000014b4031f1a09072b4009401f4f1a301f3f1a045d31000200baffe304a40614000b -001c0038401903b90c0f09b918158c0fb81b971900121247180c06081a461d10fcec3232f4ec -31002fece4f4c4ec10c6ee30b6601e801ea01e03015d013426232206151416333236013e0133 -3200111002232226271523113303e5a79292a7a79292a7fd8e3ab17bcc00ffffcc7bb13ab9b9 -022fcbe7e7cbcbe7e702526461febcfef8fef8febc6164a806140001003d0000047f04600006 -00fb402703110405040211010205050402110302060006011100000642020300bf0506050302 -010504000710d44bb00a5458b90000004038594bb014544bb015545b58b90000ffc03859c417 -3931002fec3239304b5358071005ed071008ed071008ed071005ed592201408e48026a027b02 -7f02860280029102a402080600060109030904150015011a031a042600260129032904200835 -0035013a033a0430084600460149034904460548064008560056015903590450086600660169 -036904670568066008750074017b037b0475057a068500850189038904890586069600960197 -029a03980498059706a805a706b008c008df08ff083e5d005d133309013301233dc3015e015e -c3fe5cfa0460fc5403acfba00000000100b2ffe3052905d50011004040160802110b0005950e -8c09008112081c0a38011c00411210fc4bb0105458b90000ffc03859ecfcec310010e432f4ec -11393939393001b61f138f139f13035d133311141633323635113311100021200011b2cbaec3 -c2aecbfedffee6fee5fedf05d5fc75f0d3d3f0038bfc5cfedcfed6012a012400000200c90000 -055405d50013001c00b14035090807030a061103040305110404034206040015030415950914 -950d810b040506031109001c160e050a191904113f140a1c0c041d10fcec32fcc4ec11173911 -39393931002f3cf4ecd4ec123912391239304b5358071005ed071005ed1117395922b2401e01 -015d40427a130105000501050206030704150015011402160317042500250125022603270626 -0726082609201e3601360246014602680575047505771388068807980698071f5d005d011e01 -171323032e012b01112311212016151406011133323635342623038d417b3ecdd9bf4a8b78dc -ca01c80100fc83fd89fe9295959202bc16907efe68017f9662fd8905d5d6d88dba024ffdee87 -8383850000020071ffe30475047b000b0017004a401306b91200b90cb8128c1809120f510312 -15451810fcecf4ec310010e4f4ec10ee3040233f197b007b067f077f087f097f0a7f0b7b0c7f -0d7f0e7f0f7f107f117b12a019f01911015d0122061514163332363534262732001110002322 -00111000027394acab9593acac93f00112feeef0f1feef011103dfe7c9c9e7e8c8c7e99cfec8 -feecfeedfec701390113011401380000000100c90000046a05d500050025400c029500810401 -1c033a00040610fcecec31002fe4ec304009300750078003800404015d133311211521c9ca02 -d7fc5f05d5fad5aa00010073ffe3052705f000190036401a0da10eae0a951101a100ae049517 -91118c1a07190d003014101a10fcec32ec310010e4f4ecf4ec10eef6ee30b40f1b1f1b02015d -01152e0123200011100021323637150e01232000111000213216052766e782ff00fef0011001 -0082e7666aed84feadfe7a0186015386ed0562d55f5efec7fed8fed9fec75e5fd34848019f01 -670168019f47000000010044000007a605d5000c017b4049051a0605090a09041a0a09031a0a -0b0a021a01020b0b0a061107080705110405080807021103020c000c011100000c420a050203 -060300af0b080c0b0a09080605040302010b07000d10d4cc173931002f3cec32321739304b53 -58071005ed071008ed071008ed071005ed071008ed071005ed0705ed071008ed5922b2000e01 -015d40f206020605020a000a000a120a2805240a200a3e023e05340a300a4c024d05420a400a -59026a026b05670a600a7b027f027c057f05800a960295051d07000902080300040605000500 -0601070408000807090009040a0a0c000e1a0315041508190c100e2004210520062007200823 -09240a250b200e200e3c023a033504330530083609390b3f0c300e460046014a024004450540 -0542064207420840084009440a4d0c400e400e58025608590c500e6602670361046205600660 -0760086409640a640b770076017b027803770474057906790777087008780c7f0c7f0e860287 -038804890585098a0b8f0e97049f0eaf0e5b5d005d1333090133090133012309012344cc013a -0139e3013a0139cdfe89fefec5fec2fe05d5fb1204eefb1204eefa2b0510faf00000000100c9 -0000048b05d5000b002e401506950402950081089504ad0a05010907031c00040c10fcec32d4 -c4c431002fececf4ec10ee30b21f0d01015d132115211121152111211521c903b0fd1a02c7fd -3902f8fc3e05d5aafe46aafde3aa00000001003b000004790460000b01434046051106070604 -1103040707060411050401020103110202010b110001000a11090a0101000a110b0a07080709 -11080807420a070401040800bf05020a0704010408000208060c10d44bb00a544bb00f545b4b -b010545b4bb011545b58b90006004038594bb0145458b90006ffc03859c4d4c411173931002f -3cec321739304b5358071005ed071008ed071008ed071005ed071005ed071008ed071008ed07 -1005ed59220140980a04040a1a04150a260a3d04310a55045707580a660a76017a047607740a -8d04820a99049f049707920a900aa601a904af04a507a30aa00a1c0a03040505090a0b1a0315 -0515091a0b2903260525092a0b200d3a013903370534073609390b300d4903460545094a0b40 -0d590056015902590357055606590756085609590b500d6f0d78017f0d9b019407ab01a407b0 -0dcf0ddf0dff0d2f5d005d09022309012309013309010464fe6b01aad9febafebad901b3fe72 -d9012901290460fddffdc101b8fe48024a0216fe71018f00000200f0000001c3042300030007 -001c400e068304a60083020501030400180810fc3cec3231002fecf4ec303733152311331523 -f0d3d3d3d3fefe0423fe00000001002f000002f8061400130059401c0510010c08a906018700 -970e06bc0a02130700070905080d0f0b4c1410fc4bb00a5458b9000b004038594bb00e5458b9 -000bffc038593cc4fc3cc4c412393931002fe432fcec10ee321239393001b640155015a01503 -5d01152322061d012115211123112335333534363302f8b0634d012ffed1b9b0b0aebd061499 -5068638ffc2f03d18f4ebbab000200d7054603290610000300070092400e0602ce0400cd0801 -64000564040810dcfcd4ec310010fc3cec3230004bb00a544bb00d545b58bd00080040000100 -080008ffc03811373859014bb00c544bb00d545b4bb00e545b4bb017545b58bd0008ffc00001 -0008000800403811373859014bb00f544bb019545b58bd00080040000100080008ffc0381137 -3859401160016002600560067001700270057006085d0133152325331523025ecbcbfe79cbcb -0610cacaca00013500b800cb00cb00c100aa009c01a600b800660000007100cb00a002b20085 -007500b800c301cb0189022d00cb00a600f000d300aa008700cb03aa0400014a003300cb0000 -00d9050200f4015400b4009c01390114013907060400044e04b4045204b804e704cd00370473 -04cd04600473013303a2055605a60556053903c5021200c9001f00b801df007300ba03e90333 -03bc0444040e00df03cd03aa00e503aa0404000000cb008f00a4007b00b80014016f007f027b -0252008f00c705cd009a009a006f00cb00cd019e01d300f000ba018300d5009803040248009e -01d500c100cb00f600830354027f00000333026600d300c700a400cd008f009a0073040005d5 -010a00fe022b00a400b4009c00000062009c0000001d032d05d505d505d505f0007f007b0054 -00a406b80614072301d300b800cb00a601c301ec069300a000d3035c037103db0185042304a8 -0448008f0139011401390360008f05d5019a0614072306660179046004600460047b009c0000 -0277046001aa00e904600762007b00c5007f027b000000b4025205cd006600bc006600770610 -00cd013b01850389008f007b0000001d00cd074a042f009c009c0000077d006f0000006f0335 -006a006f007b00ae00b2002d0396008f027b00f600830354063705f6008f009c04e10266008f -018d02f600cd03440029006604ee00730000140000960000b707060504030201002c2010b002 -254964b040515820c859212d2cb002254964b040515820c859212d2c20100720b00050b00d79 -20b8ffff5058041b0559b0051cb0032508b0042523e120b00050b00d7920b8ffff5058041b05 -59b0051cb0032508e12d2c4b505820b0fd454459212d2cb002254560442d2c4b5358b00225b0 -022545445921212d2c45442d2cb00225b0022549b00525b005254960b0206368208a108a233a -8a10653a2d000001000000025eb8eadc5dee5f0f3cf5001f080000000000d3d94ef700000000 -d3d94ef7f7d6fc4c0e5909dc00000008000000010000000000010000076dfe1d00000efef7d6 -fa510e5900010000000000000000000000000000002304cd0066053f00c9051200ae051200ba -0514007104ec0071025c00c903230037034a00ba042b006f05790010068b005604e7007b0239 -00c10514007105790010023900c104a200ba04660071051200ba04e50071051400ba028b0000 -04bc003d05db00b2058f00c904e50071047500c90596007307e90044050e00c904bc003b02b2 -00f002d1002f040000d700000000000000440000016c000001f00000026800000300000003d4 -0000041c000004980000050800000668000007480000096c00000a9800000ad400000b9c0000 -0c9800000ce800000dd800000e7000000ee800000f1400000fac00000fac000010d000001154 -000012680000130c00001350000013e8000015a40000160400001788000017c8000018600000 -19180001000000230354002b0068000c000200100099000800000415021600080004b8028040 -fffbfe03fa1403f92503f83203f79603f60e03f5fe03f4fe03f32503f20e03f19603f02503ef -8a4105effe03ee9603ed9603ecfa03ebfa03eafe03e93a03e84203e7fe03e63203e5e45305e5 -9603e48a4105e45303e3e22f05e3fa03e22f03e1fe03e0fe03df3203de1403dd9603dcfe03db -1203da7d03d9bb03d8fe03d68a4105d67d03d5d44705d57d03d44703d3d21b05d3fe03d21b03 -d1fe03d0fe03cffe03cefe03cd9603cccb1e05ccfe03cb1e03ca3203c9fe03c6851105c61c03 -c51603c4fe03c3fe03c2fe03c1fe03c0fe03bffe03befe03bdfe03bcfe03bbfe03ba1103b986 -2505b9fe03b8b7bb05b8fe03b7b65d05b7bb03b78004b6b52505b65d40ff03b64004b52503b4 -fe03b39603b2fe03b1fe03b0fe03affe03ae6403ad0e03acab2505ac6403abaa1205ab2503aa -1203a98a4105a9fa03a8fe03a7fe03a6fe03a51203a4fe03a3a20e05a33203a20e03a16403a0 -8a4105a096039ffe039e9d0c059efe039d0c039c9b19059c64039b9a10059b19039a1003990a -0398fe0397960d0597fe03960d03958a410595960394930e05942803930e0392fa039190bb05 -91fe03908f5d0590bb039080048f8e25058f5d038f40048e25038dfe038c8b2e058cfe038b2e -038a8625058a410389880b05891403880b03878625058764038685110586250385110384fe03 -8382110583fe0382110381fe0380fe037ffe0340ff7e7d7d057efe037d7d037c64037b541505 -7b25037afe0379fe03780e03770c03760a0375fe0374fa0373fa0372fa0371fa0370fe036ffe -036efe036c21036bfe036a1142056a530369fe03687d036711420566fe0365fe0364fe0363fe -0362fe03613a0360fa035e0c035dfe035bfe035afe0359580a0559fa03580a03571619055732 -0356fe035554150555420354150353011005531803521403514a130551fe03500b034ffe034e -4d10054efe034d10034cfe034b4a13054bfe034a4910054a1303491d0d05491003480d0347fe -0346960345960344fe0343022d0543fa0342bb03414b0340fe033ffe033e3d12053e14033d3c -0f053d12033c3b0d053c40ff0f033b0d033afe0339fe033837140538fa033736100537140336 -350b05361003350b03341e03330d0332310b0532fe03310b03302f0b05300d032f0b032e2d09 -052e10032d09032c32032b2a25052b64032a2912052a25032912032827250528410327250326 -250b05260f03250b0324fe0323fe03220f03210110052112032064031ffa031e1d0d051e6403 -1d0d031c1142051cfe031bfa031a42031911420519fe031864031716190517fe031601100516 -190315fe0314fe0313fe031211420512fe0311022d05114203107d030f64030efe030d0c1605 -0dfe030c0110050c16030bfe030a100309fe0308022d0508fe030714030664030401100504fe -03401503022d0503fe0302011005022d0301100300fe0301b80164858d012b2b2b2b2b2b2b2b +0f2495829eac1e00000000010087ffe304a205f00027007e403c0d0c020e0b021e1f1e080902 +070a021f1f1e420a0b1e1f0415010015a11494189511049500942591118c281e0a0b1f1b0700 +221b190e2d071914222810dcc4ecfcece4111239393939310010e4f4e4ec10eef6ee10c61117 +39304b535807100eed11173907100eed1117395922b20f2901015db61f292f294f29035d0115 +2e012322061514161f011e0115140421222627351e013332363534262f012e01353424333216 +044873cc5fa5b377a67ae2d7feddfee76aef807bec72adbc879a7be2ca0117f569da05a4c537 +36807663651f192bd9b6d9e0302fd04546887e6e7c1f182dc0abc6e42600000100c900000533 +05d500090079401e071101020102110607064207020300af0805060107021c0436071c00040a +10fcecfcec11393931002f3cec323939304b5358071004ed071004ed5922b21f0b01015d4030 +3602380748024707690266078002070601090615011a06460149065701580665016906790685 +018a0695019a069f0b105d005d13210111331121011123c901100296c4fef0fd6ac405d5fb1f +04e1fa2b04e1fb1f000300c9000004ec05d5000800110020004340231900950a099512810195 +0aad1f110b080213191f05000e1c1605191c2e09001c12042110fcec32fcecd4ec1117393939 +31002fececf4ec10ee3930b20f2201015d011121323635342623011121323635342623252132 +16151406071e01151404232101930144a39d9da3febc012b94919194fe0b0204e7fa807c95a5 +fef0fbfde802c9fddd878b8c850266fe3e6f727170a6c0b189a21420cb98c8da000100100000 +056805d5000600b7402704110506050311020306060503110403000100021101010042030401 +af0006040302000505010710d4c4173931002fec3239304b5358071005ed071008ed071008ed +071005ed5922b2500801015d406200032a03470447055a037d03830307060007020804090615 +0114021a041a052a002601260229042905250620083800330133023c043c0537064800450145 +02490449054706590056066602690469057a0076017602790479057506800898009706295d00 +5d21013309013301024afdc6d301d901dad2fdc705d5fb1704e9fa2b00010056000006350460 +000c01eb404905550605090a0904550a0903550a0b0a025501020b0b0a061107080705110405 +080807021103020c000c011100000c420a050203060300bf0b080c0b0a09080605040302010b +07000d10d44bb00a544bb011545b4bb012545b4bb013545b4bb00b545b58b900000040385901 +4bb00c544bb00d545b4bb010545b58b90000ffc03859cc173931002f3cec32321739304b5358 +071005ed071008ed071008ed071005ed071008ed071005ed0705ed071008ed59220140ff0502 +16021605220a350a49024905460a400a5b025b05550a500a6e026e05660a79027f0279057f05 +870299029805940abc02bc05ce02c703cf051d0502090306040b050a080b09040b050c150219 +0316041a051b081b09140b150c2500250123022703210425052206220725082709240a210b23 +0c390336043608390c300e460248034604400442054006400740084409440a440b400e400e56 +0056015602500451055206520750085309540a550b6300640165026a0365046a056a066a076e +09610b670c6f0e7500750179027d0378047d057a067f067a077f07780879097f097b0a760b7d +0c870288058f0e97009701940293039c049b05980698079908402f960c9f0ea600a601a402a4 +03ab04ab05a906a907ab08a40caf0eb502b103bd04bb05b809bf0ec402c303cc04ca05795d00 +5d13331b01331b013301230b012356b8e6e5d9e6e5b8fedbd9f1f2d90460fc96036afc96036a +fba00396fc6a0002007bffe3042d047b000a002500bc4027191f0b17090e00a91706b90e1120 +861fba1cb923b8118c170c001703180d09080b1f030814452610fcecccd4ec32321139393100 +2fc4e4f4fcf4ec10c6ee10ee11391139123930406e301d301e301f3020302130223f27401d40 +1e401f402040214022501d501e501f50205021502250277027851d871e871f87208721852290 +27a027f0271e301e301f30203021401e401f40204021501e501f50205021601e601f60206021 +701e701f70207021801e801f80208021185d015d0122061514163332363d01371123350e0123 +2226353436332135342623220607353e0133321602bedfac816f99b9b8b83fbc88accbfdfb01 +02a79760b65465be5af3f00233667b6273d9b4294cfd81aa6661c1a2bdc0127f8b2e2eaa2727 +fc00000100c100000179061400030022b7009702010800460410fcec31002fec30400d100540 +05500560057005f00506015d13331123c1b8b80614f9ec0000020071fe56045a047b000b0028 +004a4023190c1d0912861316b90f03b92623b827bc09b90fbd1a1d261900080c470612122045 +2910fcc4ecf4ec323231002fc4e4ece4f4c4ec10fed5ee1112393930b6602a802aa02a03015d +01342623220615141633323617100221222627351e013332363d010e01232202111012333216 +17353303a2a59594a5a59495a5b8fefefa61ac51519e52b5b439b27ccefcfcce7cb239b8023d +c8dcdcc8c7dcdcebfee2fee91d1eb32c2abdbf5b6362013a01030104013a6263aa0000020010 +0000056805d50002000a00c2404100110100040504021105050401110a030a0011020003030a +0711050406110505040911030a08110a030a4200030795010381090509080706040302010009 +050a0b10d4c4173931002f3ce4d4ec1239304b5358071005ed0705ed071005ed0705ed071008 +ed071005ed071005ed071008ed5922b2200c01015d40420f010f020f070f080f005800760070 +008c000907010802060309041601190256015802500c67016802780176027c03720477077808 +87018802800c980299039604175d005d090121013301230321032302bcfeee0225fe7be50239 +d288fd5f88d5050efd1903aefa2b017ffe810000000200c100000179061400030007002b400e +06be04b100bc020501080400460810fc3cec3231002fe4fcec30400b10094009500960097009 +05015d1333112311331523c1b8b8b8b80460fba00614e900000100ba0000049c0614000a00bc +40290811050605071106060503110405040211050504420805020303bc009709060501040608 +010800460b10fcec32d4c4113931002f3cece41739304b5358071004ed071005ed071005ed07 +1004ed5922b2100c01015d405f04020a081602270229052b0856026602670873027705820289 +058e08930296059708a3021209050906020b030a072803270428052b062b07400c6803600c89 +03850489058d068f079a039707aa03a705b607c507d607f703f003f704f0041a5d71005d1333 +110133090123011123bab90225ebfdae026bf0fdc7b90614fc6901e3fdf4fdac0223fddd0001 +0071ffe303e7047b0019003f401b00860188040e860d880ab91104b917b8118c1a07120d0048 +14451a10fce432ec310010e4f4ec10fef4ee10f5ee30400b0f1b101b801b901ba01b05015d01 +152e0123220615141633323637150e0123220011100021321603e74e9d50b3c6c6b3509d4e4d +a55dfdfed6012d010655a20435ac2b2be3cdcde32b2baa2424013e010e0112013a2300000001 +00ba000004640614001300344019030900030e0106870e11b80c970a010208004e0d09080b46 +1410fcec32f4ec31002f3cecf4c4ec1112173930b2601501015d011123113426232206151123 +1133113e013332160464b87c7c95acb9b942b375c1c602a4fd5c029e9f9ebea4fd870614fd9e +6564ef00ffff0071ffe3047506101226001d00001106002673000014b4031f1a09072b400940 +1f4f1a301f3f1a045d31000200baffe304a40614000b001c0038401903b90c0f09b918158c0f +b81b971900121247180c06081a461d10fcec3232f4ec31002fece4f4c4ec10c6ee30b6601e80 +1ea01e03015d013426232206151416333236013e01333200111002232226271523113303e5a7 +9292a7a79292a7fd8e3ab17bcc00ffffcc7bb13ab9b9022fcbe7e7cbcbe7e702526461febcfe +f8fef8febc6164a806140001003d0000047f0460000600fb4027031104050402110102050504 +02110302060006011100000642020300bf0506050302010504000710d44bb00a5458b9000000 +4038594bb014544bb015545b58b90000ffc03859c4173931002fec3239304b5358071005ed07 +1008ed071008ed071005ed592201408e48026a027b027f02860280029102a402080600060109 +030904150015011a031a0426002601290329042008350035013a033a04300846004601490349 +04460548064008560056015903590450086600660169036904670568066008750074017b037b +0475057a068500850189038904890586069600960197029a03980498059706a805a706b008c0 +08df08ff083e5d005d133309013301233dc3015e015ec3fe5cfa0460fc5403acfba000000001 +00b2ffe3052905d50011004040160802110b0005950e8c09008112081c0a38011c00411210fc +4bb0105458b90000ffc03859ecfcec310010e432f4ec11393939393001b61f138f139f13035d +133311141633323635113311100021200011b2cbaec3c2aecbfedffee6fee5fedf05d5fc75f0 +d3d3f0038bfc5cfedcfed6012a012400000200c90000055405d50013001c00b1403509080703 +0a061103040305110404034206040015030415950914950d810b040506031109001c160e050a +191904113f140a1c0c041d10fcec32fcc4ec1117391139393931002f3cf4ecd4ec1239123912 +39304b5358071005ed071005ed1117395922b2401e01015d40427a1301050005010502060307 +041500150114021603170425002501250226032706260726082609201e360136024601460268 +0575047505771388068807980698071f5d005d011e01171323032e012b011123112120161514 +06011133323635342623038d417b3ecdd9bf4a8b78dcca01c80100fc83fd89fe9295959202bc +16907efe68017f9662fd8905d5d6d88dba024ffdee878383850000020071ffe30475047b000b +0017004a401306b91200b90cb8128c1809120f51031215451810fcecf4ec310010e4f4ec10ee +3040233f197b007b067f077f087f097f0a7f0b7b0c7f0d7f0e7f0f7f107f117b12a019f01911 +015d012206151416333236353426273200111000232200111000027394acab9593acac93f001 +12feeef0f1feef011103dfe7c9c9e7e8c8c7e99cfec8feecfeedfec701390113011401380000 +000100c90000046a05d500050025400c0295008104011c033a00040610fcecec31002fe4ec30 +4009300750078003800404015d133311211521c9ca02d7fc5f05d5fad5aa00010073ffe30527 +05f000190036401a0da10eae0a951101a100ae04951791118c1a07190d003014101a10fcec32 +ec310010e4f4ecf4ec10eef6ee30b40f1b1f1b02015d01152e0123200011100021323637150e +01232000111000213216052766e782ff00fef00110010082e7666aed84feadfe7a0186015386 +ed0562d55f5efec7fed8fed9fec75e5fd34848019f01670168019f47000000010044000007a6 +05d5000c017b4049051a0605090a09041a0a09031a0a0b0a021a01020b0b0a06110708070511 +0405080807021103020c000c011100000c420a050203060300af0b080c0b0a09080605040302 +010b07000d10d4cc173931002f3cec32321739304b5358071005ed071008ed071008ed071005 +ed071008ed071005ed0705ed071008ed5922b2000e01015d40f206020605020a000a000a120a +2805240a200a3e023e05340a300a4c024d05420a400a59026a026b05670a600a7b027f027c05 +7f05800a960295051d070009020803000406050005000601070408000807090009040a0a0c00 +0e1a0315041508190c100e200421052006200720082309240a250b200e200e3c023a03350433 +0530083609390b3f0c300e460046014a0240044505400542064207420840084009440a4d0c40 +0e400e58025608590c500e66026703610462056006600760086409640a640b770076017b0278 +03770474057906790777087008780c7f0c7f0e860287038804890585098a0b8f0e97049f0eaf +0e5b5d005d1333090133090133012309012344cc013a0139e3013a0139cdfe89fefec5fec2fe +05d5fb1204eefb1204eefa2b0510faf00000000100c90000048b05d5000b002e401506950402 +950081089504ad0a05010907031c00040c10fcec32d4c4c431002fececf4ec10ee30b21f0d01 +015d132115211121152111211521c903b0fd1a02c7fd3902f8fc3e05d5aafe46aafde3aa0000 +0001003b000004790460000b0143404605110607060411030407070604110504010201031102 +02010b110001000a11090a0101000a110b0a0708070911080807420a070401040800bf05020a +0704010408000208060c10d44bb00a544bb00f545b4bb010545b4bb011545b58b90006004038 +594bb0145458b90006ffc03859c4d4c411173931002f3cec321739304b5358071005ed071008 +ed071008ed071005ed071005ed071008ed071008ed071005ed59220140980a04040a1a04150a +260a3d04310a55045707580a660a76017a047607740a8d04820a99049f049707920a900aa601 +a904af04a507a30aa00a1c0a03040505090a0b1a03150515091a0b2903260525092a0b200d3a +013903370534073609390b300d4903460545094a0b400d590056015902590357055606590756 +085609590b500d6f0d78017f0d9b019407ab01a407b00dcf0ddf0dff0d2f5d005d0902230901 +2309013309010464fe6b01aad9febafebad901b3fe72d9012901290460fddffdc101b8fe4802 +4a0216fe71018f00000200f0000001c3042300030007001c400e068304a60083020501030400 +180810fc3cec3231002fecf4ec303733152311331523f0d3d3d3d3fefe0423fe00000001002f +000002f8061400130059401c0510010c08a906018700970e06bc0a02130700070905080d0f0b +4c1410fc4bb00a5458b9000b004038594bb00e5458b9000bffc038593cc4fc3cc4c412393931 +002fe432fcec10ee321239393001b640155015a015035d01152322061d012115211123112335 +333534363302f8b0634d012ffed1b9b0b0aebd0614995068638ffc2f03d18f4ebbabffff007b +ffe3042d06101226000f00001106002652000020b4142d280b072b40157f286f28502d5f2840 +2d4f28302d3f28002d0f280a5d31000200d7054603290610000300070092400e0602ce0400cd +080164000564040810dcfcd4ec310010fc3cec3230004bb00a544bb00d545b58bd0008004000 +0100080008ffc03811373859014bb00c544bb00d545b4bb00e545b4bb017545b58bd0008ffc0 +00010008000800403811373859014bb00f544bb019545b58bd00080040000100080008ffc038 +11373859401160016002600560067001700270057006085d0133152325331523025ecbcbfe79 +cbcb0610cacaca00013500b800cb00cb00c100aa009c01a600b800660000007100cb00a002b2 +0085007500b800c301cb0189022d00cb00a600f000d300aa008700cb03aa0400014a003300cb +000000d9050200f4015400b4009c01390114013907060400044e04b4045204b804e704cd0037 +047304cd04600473013303a2055605a60556053903c5021200c9001f00b801df007300ba03e9 +033303bc0444040e00df03cd03aa00e503aa0404000000cb008f00a4007b00b80014016f007f +027b0252008f00c705cd009a009a006f00cb00cd019e01d300f000ba018300d5009803040248 +009e01d500c100cb00f600830354027f00000333026600d300c700a400cd008f009a00730400 +05d5010a00fe022b00a400b4009c00000062009c0000001d032d05d505d505d505f0007f007b +005400a406b80614072301d300b800cb00a601c301ec069300a000d3035c037103db01850423 +04a80448008f0139011401390360008f05d5019a0614072306660179046004600460047b009c +00000277046001aa00e904600762007b00c5007f027b000000b4025205cd006600bc00660077 +061000cd013b01850389008f007b0000001d00cd074a042f009c009c0000077d006f0000006f +0335006a006f007b00ae00b2002d0396008f027b00f600830354063705f6008f009c04e10266 +008f018d02f600cd03440029006604ee00730000140000960000b707060504030201002c2010 +b002254964b040515820c859212d2cb002254964b040515820c859212d2c20100720b00050b0 +0d7920b8ffff5058041b0559b0051cb0032508b0042523e120b00050b00d7920b8ffff505804 +1b0559b0051cb0032508e12d2c4b505820b0fd454459212d2cb002254560442d2c4b5358b002 +25b0022545445921212d2c45442d2cb00225b0022549b00525b005254960b0206368208a108a +233a8a10653a2d000001000000025eb85ef252705f0f3cf5001f080000000000d3d94ef70000 +0000d3d94ef7f7d6fc4c0e5909dc00000008000000010000000000010000076dfe1d00000efe +f7d6fa510e5900010000000000000000000000000000002704cd0066053f00c9051200ae0512 +00ba0514007104ec0071025c00c903230037034a00ba042b006f0514008705fc00c9057d00c9 +05790010068b005604e7007b023900c10514007105790010023900c104a200ba046600710512 +00ba04e50071051400ba028b000004bc003d05db00b2058f00c904e50071047500c905960073 +07e90044050e00c904bc003b02b200f002d1002f04e7007b040000d700000000000000440000 +016c000001f00000026800000300000003d40000041c00000498000005080000066800000760 +00000808000008b80000099800000bbc00000ce800000d2400000dec00000ee800000f380000 +1028000010c00000113800001164000011fc000011fc00001320000013a4000014b80000155c +000015a000001638000017f400001854000019d800001a1800001ab000001ae800001ba00001 +000000270354002b0068000c000200100099000800000415021600080004b8028040fffbfe03 +fa1403f92503f83203f79603f60e03f5fe03f4fe03f32503f20e03f19603f02503ef8a4105ef +fe03ee9603ed9603ecfa03ebfa03eafe03e93a03e84203e7fe03e63203e5e45305e59603e48a +4105e45303e3e22f05e3fa03e22f03e1fe03e0fe03df3203de1403dd9603dcfe03db1203da7d +03d9bb03d8fe03d68a4105d67d03d5d44705d57d03d44703d3d21b05d3fe03d21b03d1fe03d0 +fe03cffe03cefe03cd9603cccb1e05ccfe03cb1e03ca3203c9fe03c6851105c61c03c51603c4 +fe03c3fe03c2fe03c1fe03c0fe03bffe03befe03bdfe03bcfe03bbfe03ba1103b9862505b9fe +03b8b7bb05b8fe03b7b65d05b7bb03b78004b6b52505b65d40ff03b64004b52503b4fe03b396 +03b2fe03b1fe03b0fe03affe03ae6403ad0e03acab2505ac6403abaa1205ab2503aa1203a98a +4105a9fa03a8fe03a7fe03a6fe03a51203a4fe03a3a20e05a33203a20e03a16403a08a4105a0 +96039ffe039e9d0c059efe039d0c039c9b19059c64039b9a10059b19039a1003990a0398fe03 +97960d0597fe03960d03958a410595960394930e05942803930e0392fa039190bb0591fe0390 +8f5d0590bb039080048f8e25058f5d038f40048e25038dfe038c8b2e058cfe038b2e038a8625 +058a410389880b05891403880b03878625058764038685110586250385110384fe0383821105 +83fe0382110381fe0380fe037ffe0340ff7e7d7d057efe037d7d037c64037b5415057b25037a +fe0379fe03780e03770c03760a0375fe0374fa0373fa0372fa0371fa0370fe036ffe036efe03 +6c21036bfe036a1142056a530369fe03687d036711420566fe0365fe0364fe0363fe0362fe03 +613a0360fa035e0c035dfe035bfe035afe0359580a0559fa03580a035716190557320356fe03 +5554150555420354150353011005531803521403514a130551fe03500b034ffe034e4d10054e +fe034d10034cfe034b4a13054bfe034a4910054a1303491d0d05491003480d0347fe03469603 +45960344fe0343022d0543fa0342bb03414b0340fe033ffe033e3d12053e14033d3c0f053d12 +033c3b0d053c40ff0f033b0d033afe0339fe033837140538fa033736100537140336350b0536 +1003350b03341e03330d0332310b0532fe03310b03302f0b05300d032f0b032e2d09052e1003 +2d09032c32032b2a25052b64032a2912052a25032912032827250528410327250326250b0526 +0f03250b0324fe0323fe03220f03210110052112032064031ffa031e1d0d051e64031d0d031c +1142051cfe031bfa031a42031911420519fe031864031716190517fe031601100516190315fe +0314fe0313fe031211420512fe0311022d05114203107d030f64030efe030d0c16050dfe030c +0110050c16030bfe030a100309fe0308022d0508fe030714030664030401100504fe03401503 +022d0503fe0302011005022d0301100300fe0301b80164858d012b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b -2b2b2b2b2b002b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b +2b002b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b 2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b -2b2b2b2b2b2b2b2b2b2b2b1d00> +2b2b2b2b2b2b2b1d00> ] def /f-0-0 currentdict end definefont pop %%EndResource @@ -470,7 +496,34 @@ BT [(K)48(unden)]TJ -1.483805 -29.806774 Td [(Inter)19(essenten)]TJ -70.306055 29.330022 Td +72.250272 29.427233 Td +(SNB)Tj +ET +q 1 0 0 -1 0 595.275574 cm +773.176 473.676 m 753.477 526.711 753.477 526.711 753.477 526.711 c h +773.176 473.676 m S Q +q 1 0 0 -1 0 595.275574 cm +773.176 473.676 m 784.539 525.195 l h +773.176 473.676 m S Q +q 1 0 0 -1 0 595.275574 cm +773.176 473.676 m 773.176 422.918 l h +773.176 473.676 m S Q +1.081781 w +q 1 0 0 -1 0 595.275574 cm +783.562 412.375 m 783.562 418.125 778.898 422.789 773.148 422.789 c 767.395 + 422.789 762.73 418.125 762.73 412.375 c 762.73 406.621 767.395 401.957 +773.148 401.957 c 778.898 401.957 783.562 406.621 783.562 412.375 c h +783.562 412.375 m S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +773.176 445.836 m 749.688 436.555 l h +773.176 445.836 m S Q +q 1 0 0 -1 0 595.275574 cm +796.344 435.789 m 773.176 445.836 l h +796.344 435.789 m S Q +BT +10 0 0 10 740.031277 57.082089 Tm +/f-0-0 1 Tf [(V)79(erwaltu)-3(ng)]TJ ET 0.507321 w @@ -488,23 +541,23 @@ BT ET 0.514942 w q 1 0 0 -1 0 595.275574 cm -643.047 215.141 m 643.047 229.133 619.699 240.48 590.898 240.48 c 562.098 - 240.48 538.754 229.133 538.754 215.141 c 538.754 201.145 562.098 189.801 - 590.898 189.801 c 619.699 189.801 643.047 201.145 643.047 215.141 c h -643.047 215.141 m S Q +621.66 504.828 m 621.66 518.824 598.312 530.168 569.512 530.168 c 540.715 + 530.168 517.367 518.824 517.367 504.828 c 517.367 490.832 540.715 479.488 + 569.512 479.488 c 598.312 479.488 621.66 490.832 621.66 504.828 c h +621.66 504.828 m S Q BT -10 0 0 10 548.829418 376.408389 Tm +10 0 0 10 527.44301 86.719762 Tm /f-0-0 1 Tf [(Artik)34(el verwalten)]TJ ET 0.59857 w q 1 0 0 -1 0 595.275574 cm -647.379 123.18 m 647.379 139.445 620.238 152.633 586.762 152.633 c 553.285 - 152.633 526.145 139.445 526.145 123.18 c 526.145 106.914 553.285 93.727 - 586.762 93.727 c 620.238 93.727 647.379 106.914 647.379 123.18 c h -647.379 123.18 m S Q +625.992 412.867 m 625.992 429.137 598.855 442.324 565.375 442.324 c 531.898 + 442.324 504.758 429.137 504.758 412.867 c 504.758 396.602 531.898 383.414 + 565.375 383.414 c 598.855 383.414 625.992 396.602 625.992 412.867 c h +625.992 412.867 m S Q BT -15 0 0 15 529.977917 466.504086 Tm +15 0 0 15 508.591509 176.81546 Tm /f-0-0 1 Tf [(User ver)-3(walten)]TJ ET @@ -532,12 +585,12 @@ BT ET 0.539014 w q 1 0 0 -1 0 595.275574 cm -290.52 132.422 m 290.52 147.07 266.082 158.945 235.934 158.945 c 205.789 - 158.945 181.352 147.07 181.352 132.422 c 181.352 117.773 205.789 105.898 - 235.934 105.898 c 266.082 105.898 290.52 117.773 290.52 132.422 c h -290.52 132.422 m S Q +293.922 154.395 m 293.922 169.043 269.484 180.918 239.336 180.918 c 209.191 + 180.918 184.754 169.043 184.754 154.395 c 184.754 139.746 209.191 127.867 + 239.336 127.867 c 269.484 127.867 293.922 139.746 293.922 154.395 c h +293.922 154.395 m S Q BT -15 0 0 15 200.570256 457.262714 Tm +15 0 0 15 203.972639 435.290602 Tm /f-0-0 1 Tf [(Chec)-3(k)34(out)]TJ ET @@ -554,66 +607,6 @@ BT -1.85457 -1.348001 Td [(W)65(ar)20(enk)33(orb legen)]TJ ET -0.75 w -q 1 0 0 -1 0 595.275574 cm -77.297 453.766 m 231.035 333.582 l S Q -0.751181 w -[ 4.507086 4.507086] 0 d -q 1 0 0 -1 0 595.275574 cm -397.941 250.453 m 396.109 412.465 l S Q -397.855 337.311 m 400.828 334.272 l 397.941 344.822 l 394.816 334.342 l - h -397.855 337.311 m f* -0.801209 w -[] 0.0 d -q -0.0113087 -1 -1 0.0113087 0 595.275574 cm -253.433 -400.721 m 256.438 -403.728 l 245.921 -400.722 l 256.436 -397.716 - l h -253.433 -400.721 m S Q -0.75 w -q 1 0 0 -1 0 595.275574 cm -77.297 453.766 m 336.887 443.504 l S Q -q 1 0 0 -1 0 595.275574 cm -233.289 290.535 m 76.223 152.562 l S Q -q 1 0 0 -1 0 595.275574 cm -183.102 139.082 m 76.223 152.562 l S Q -0.751181 w -[ 4.507087 4.507087] 0 d -q 1 0 0 -1 0 595.275574 cm -289.855 128.297 m 345.449 124.043 l S Q -337.957 470.658 m 335.191 467.436 l 345.449 471.233 l 334.734 473.428 l - h -337.957 470.658 m f* -0.798926 w -[] 0.0 d -q -1 -0.0764989 -0.0764989 1 0 595.275574 cm --326.513 -149.595 m -323.519 -152.589 l -334.005 -149.594 l -323.52 -146.597 - l h --326.513 -149.595 m S Q -0.75 w -[ 4.5 4.5] 0 d -q 1 0 0 -1 0 595.275574 cm -398.246 145.977 m 398.23 199.859 l S Q -398.234 402.916 m 395.234 405.916 l 398.23 395.416 l 401.234 405.916 l -h -398.234 402.916 m f* -0.8 w -[] 0.0 d -q 0.000263047 1 1 -0.000263047 0 595.275574 cm --192.255 398.285 m -189.255 395.284 l -199.755 398.283 l -189.254 401.284 - l h --192.255 398.285 m S Q -0.75 w -q 1 0 0 -1 0 595.275574 cm -634.844 201.496 m 774.797 158.051 l S Q -q 1 0 0 -1 0 595.275574 cm -643.395 133.684 m 774.797 158.051 l S Q -q 1 0 0 -1 0 595.275574 cm -406.227 334.773 m 396.621 334.758 l S Q -q 1 0 0 -1 0 595.275574 cm -409.594 173.957 m 398.199 174.594 l S Q -q 1 0 0 -1 0 595.275574 cm -308.906 121.707 m 309.152 126.395 l S Q 1 g 406.227 267.701 126.172 -14.59 re f 0 g @@ -647,6 +640,150 @@ BT /f-0-0 1 Tf [(Include)]TJ ET +0.75 w +q 1 0 0 -1 0 595.275574 cm +184.852 152.781 m 76.223 152.562 l S Q +q 1 0 0 -1 0 595.275574 cm +207.516 316.594 m 77.297 453.766 l S Q +q 1 0 0 -1 0 595.275574 cm +336.887 443.504 m 77.297 453.766 l S Q +q 1 0 0 -1 0 595.275574 cm +233.289 290.535 m 76.223 152.562 l S Q +0.751181 w +[ 3.004724 3.004724] 0 d +q 1 0 0 -1 0 595.275574 cm +289.203 143.602 m 349.422 130.57 l S Q +342.078 463.115 m 339.777 459.545 l 349.422 464.705 l 338.508 465.416 l + h +342.078 463.115 m f* +0.783133 w +[] 0.0 d +q -1 -0.216401 -0.216401 1 0 595.275574 cm +-299.455 -196.963 m -296.519 -199.897 l -306.799 -196.962 l -296.52 -194.027 + l h +-299.455 -196.963 m S Q +0.75 w +[ 3 3] 0 d +q 1 0 0 -1 0 595.275574 cm +398.246 145.977 m 398.234 199.859 l S Q +398.234 402.916 m 395.234 405.916 l 398.234 395.416 l 401.234 405.916 l + h +398.234 402.916 m f* +0.8 w +[] 0.0 d +q 0.00023883 1 1 -0.00023883 0 595.275574 cm +-192.264 398.28 m -189.265 395.28 l -199.764 398.282 l -189.264 401.28 +l h +-192.264 398.28 m S Q +0.75 w +[ 3 3] 0 d +q 1 0 0 -1 0 595.275574 cm +396.109 412.465 m 397.941 250.453 l S Q +397.855 337.322 m 400.82 334.291 l 397.941 344.822 l 394.82 334.358 l h +397.855 337.322 m f* +0.799949 w +[] 0.0 d +q -0.0113086 -1 -1 0.0113086 0 595.275574 cm +253.422 -400.721 m 256.419 -403.72 l 245.922 -400.722 l 256.42 -397.72 +l h +253.422 -400.721 m S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +773.176 445.836 m 623 422.008 l S Q +q 1 0 0 -1 0 595.275574 cm +614.305 491.852 m 773.176 445.836 l S Q +0.527848 w +q 1 0 0 -1 0 595.275574 cm +627.422 117.543 m 627.422 131.887 603.488 143.516 573.965 143.516 c 544.445 + 143.516 520.512 131.887 520.512 117.543 c 520.512 103.199 544.445 91.57 + 573.965 91.57 c 603.488 91.57 627.422 103.199 627.422 117.543 c h +627.422 117.543 m S Q +BT +10 0 0 10 551.813287 479.222394 Tm +/f-0-0 1 Tf +[(W)65(\344hr)-3(ung)]TJ +0.464601 -1.198001 Td +[(\344nder)15(n)]TJ +ET +q 1 0 0 -1 0 595.275574 cm +633.609 241.273 m 633.609 255.617 609.676 267.246 580.152 267.246 c 550.633 + 267.246 526.699 255.617 526.699 241.273 c 526.699 226.926 550.633 215.297 + 580.152 215.297 c 609.676 215.297 633.609 226.926 633.609 241.273 c h +633.609 241.273 m S Q +BT +10 0 0 10 540.914806 358.007003 Tm +/f-0-0 1 Tf +[(W)65(\344hr)-3(ungsdat)-3(en)]TJ +0.715089 -1.299395 Td +[(aktu)-3(alisier)21(en)]TJ +ET +0.75 w +[ 3 3] 0 d +q 1 0 0 -1 0 595.275574 cm +451.684 119.254 m 520.535 118.293 l S Q +513.035 476.881 m 510.078 473.838 l 520.535 476.983 l 509.992 479.838 l + h +513.035 476.881 m f* +0.799922 w +[] 0.0 d +q -1 -0.014005 -0.014005 1 0 595.275574 cm +-511.277 -125.555 m -508.278 -128.556 l -518.777 -125.558 l -508.276 -122.556 + l h +-511.277 -125.555 m S Q +0.75 w +[ 3 3] 0 d +q 1 0 0 -1 0 595.275574 cm +575.266 143.508 m 578.855 215.305 l S Q +578.48 387.459 m 575.336 390.307 l 578.855 379.971 l 581.328 390.608 l +h +578.48 387.459 m f* +0.799002 w +[] 0.0 d +q -0.05 1 1 0.05 0 595.275574 cm +-236.15 566.673 m -233.153 563.678 l -243.638 566.674 l -233.151 569.671 + l h +-236.15 566.673 m S Q +0.75 w +q 1 0 0 -1 0 595.275574 cm +620.285 224.113 m 774.797 158.051 l S Q +1 g +586.359 425.432 39.828 -12.254 re f +0 g +0.433407 w +q 1 0 0 -1 0 595.275574 cm +586.359 169.844 39.828 12.254 re S Q +BT +10 0 0 10 587.836256 415.576925 Tm +/f-0-0 1 Tf +[(Include)]TJ +ET +1 g +478.98 527.994 14.004 -40.035 re f +0 g +0.404328 w +q 1 0 0 -1 0 595.275574 cm +478.98 67.281 14.004 40.035 re S Q +BT +0 10 -10 0 489.709371 489.540137 Tm +/f-0-0 1 Tf +[(Include)]TJ +ET +0.75 w +q 1 0 0 -1 0 595.275574 cm +308.637 121.582 m 308.465 139.367 l h +308.637 121.582 m S Q +q 1 0 0 -1 0 595.275574 cm +486.176 107.215 m 489.152 118.637 l h +486.176 107.215 m S Q +q 1 0 0 -1 0 595.275574 cm +398.32 171.438 m 409.562 172.227 l h +398.32 171.438 m S Q +q 1 0 0 -1 0 595.275574 cm +586.363 175.445 m 576.824 175.262 l h +586.363 175.445 m S Q +q 1 0 0 -1 0 595.275574 cm +397.051 333.254 m 406.203 333.641 l h +397.051 333.254 m S Q Q Q showpage %%Trailer diff --git a/docs/diagrammes/use_case.svg b/docs/diagrammes/use_case.svg index 1457fe5..b7329e3 100644 --- a/docs/diagrammes/use_case.svg +++ b/docs/diagrammes/use_case.svg @@ -18,6 +18,76 @@ sodipodi:docname="use_case.svg"> + + + + + + + + + + + + + + + - - - image/svg+xml - + @@ -117,7 +172,8 @@ + inkscape:label="actor" + sodipodi:insensitive="true"> SNB + + + + + + + + + Verwaltung + style="display:inline"> durchstöbern + id="g4798" + transform="translate(-7.5446495,102.19571)"> Artikel verwalten + id="g4806" + transform="translate(-7.5446495,102.19571)"> Login + id="g4846" + transform="translate(1.2002852,7.7512727)"> - - - - - - - - - - - - Include + + + + + + + + + + + + Währung + ändern + + + + Währungsdaten + aktualisieren + + + + + + + Include + + + + Include + + + + + + From b02e8c134374e6ba4a11aa01195115fcd19c0a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Thu, 11 Jan 2018 19:21:13 +0100 Subject: [PATCH 53/53] corrected offline error to be catched. --- .../didgeridoo/currencies/exchange_rates.py | 212 +++++++++--------- .../templates/currencies/index.html | 22 +- django/didgeridoo/currencies/views.py | 116 +++++----- 3 files changed, 180 insertions(+), 170 deletions(-) diff --git a/django/didgeridoo/currencies/exchange_rates.py b/django/didgeridoo/currencies/exchange_rates.py index 24f7c46..05c279f 100644 --- a/django/didgeridoo/currencies/exchange_rates.py +++ b/django/didgeridoo/currencies/exchange_rates.py @@ -24,117 +24,121 @@ def get_exchange_rate(): # ~~~~~~~~~~~~~~~~~~~~~ today = datetime.now().strftime("%Y-%m-%d") SNB_URL = 'https://www.snb.ch/selector/de/mmr/exfeed/rss' - urlsocket = urllib.request.urlopen(SNB_URL) - root = ET.parse(urlsocket) - root = ET.ElementTree(root) + urlsocket = '' + try: + urlsocket = urllib.request.urlopen(SNB_URL) + except urllib.error.URLError as e: + print('err: urllib.request.urlopen: ', e.reason) + if urlsocket: + root = ET.parse(urlsocket) + root = ET.ElementTree(root) + # ~~~~~~~~~~~~~~~~~~~~~ + # development block: + # ~~~~~~~~~~~~~~~~~~~~~ + # today = "2018-01-08" + # try: + # root = ET.ElementTree(file='rss') + # except Exception as e: + # print('exchange_rates.py_urlsocket failed %s ( + # %s) on date: %s for %s' + # % (e, type(e), root)) + # ~~~~~~~~~~~~~~~~~~~~~ - # ~~~~~~~~~~~~~~~~~~~~~ - # development block: - # ~~~~~~~~~~~~~~~~~~~~~ - # today = "2018-01-03" - # try: - # root = ET.ElementTree(file='rss') - # except Exception as e: - # print('exchange_rates.py_urlsocket failed %s ( - # %s) on date: %s for %s' - # % (e, type(e), root)) - # ~~~~~~~~~~~~~~~~~~~~~ + # Namespaces + ns = {'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', + 'none': 'http://purl.org/rss/1.0/', + 'dc': 'http://purl.org/dc/elements/1.1/', + 'dcterms': 'http://purl.org/dc/terms/', + 'cb': 'http://www.cbwiki.net/wiki/index.php/Specification_1.2/' + } + # Pathvariables to XML Namespaces + rate_path = 'cb:statistics/cb:exchangeRate/' + observation_path = 'cb:statistics/cb:exchangeRate/cb:observation/' + exchange_rates = {} + for item in root.findall('none:item', ns): + # for eatch item n the list we grab the release date + # to evaluate if its fresh data or old: - # Namespaces - ns = {'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', - 'none': 'http://purl.org/rss/1.0/', - 'dc': 'http://purl.org/dc/elements/1.1/', - 'dcterms': 'http://purl.org/dc/terms/', - 'cb': 'http://www.cbwiki.net/wiki/index.php/Specification_1.2/' - } - # Pathvariables to XML Namespaces - rate_path = 'cb:statistics/cb:exchangeRate/' - observation_path = 'cb:statistics/cb:exchangeRate/cb:observation/' - exchange_rates = {} - for item in root.findall('none:item', ns): - # for eatch item n the list we grab the release date - # to evaluate if its fresh data or old: - - # THE CURRENCY DATE: - datetime_str = item.find('dc:date', ns).text - # convert string to date object: - # https://stackoverflow.com/a/12282040/4061870 - # seams like snb striked the microsecond somewhere - # between Nov. and Dez. 2017 so maybe first check - # time type is with milliseconds: - try: - date = datetime.strptime(''.join( - datetime_str.rsplit(':', 1)), - "%Y-%m-%dT%H:%M:%S%z").strftime( - "%Y-%m-%d") - except Exception as e: - print('%s (%s)' % (e, type(e))) + # THE CURRENCY DATE: + datetime_str = item.find('dc:date', ns).text + # convert string to date object: + # https://stackoverflow.com/a/12282040/4061870 + # seams like snb striked the microsecond somewhere + # between Nov. and Dez. 2017 so maybe first check + # time type is with milliseconds: try: date = datetime.strptime(''.join( datetime_str.rsplit(':', 1)), - "%Y-%m-%dT%H:%M:%S.%f%z").strftime( + "%Y-%m-%dT%H:%M:%S%z").strftime( "%Y-%m-%d") - continue except Exception as e: print('%s (%s)' % (e, type(e))) - continue - # Print dates for development: - # print("date:", date, "today:", today) - # only the values of today are used so check for date in XML: - if date == today: - # now search for the currency exchange rate: - target_currency = item.find(rate_path + - 'cb:targetCurrency', ns).text - value = float(item.find(observation_path + - 'cb:value', ns).text) - value = float(value) # convert to float - foreign_value = value # copy to new value to have both. + try: + date = datetime.strptime(''.join( + datetime_str.rsplit(':', 1)), + "%Y-%m-%dT%H:%M:%S.%f%z").strftime( + "%Y-%m-%d") + continue + except Exception as e: + print('%s (%s)' % (e, type(e))) + continue + # Print dates for development: + # print("date:", date, "today:", today) + # only the values of today are used so check for date in XML: + if date == today: + # now search for the currency exchange rate: + target_currency = item.find(rate_path + + 'cb:targetCurrency', ns).text + value = float(item.find(observation_path + + 'cb:value', ns).text) + value = float(value) # convert to float + foreign_value = value # copy to new value to have both. - if item.find(observation_path + 'cb:unit_mult', ns) is None: - # because it's dangerous to check for present, - # i check for none here and have to set the target - # to 1. as im multiplying it later. - unit_mult = float("1.0") + if item.find(observation_path + 'cb:unit_mult', ns) is None: + # because it's dangerous to check for present, + # i check for none here and have to set the target + # to 1. as im multiplying it later. + unit_mult = float("1.0") + else: + # shift left by 2 digits with "/" + # https://stackoverflow.com/questions/8362792/ + # because some currencys differ widly from CHF + unit_mult = item.find(observation_path + + 'cb:unit_mult', ns).text + # unit_mult defaults to '0' so we check for 8 decimal + # values (2..-6) they represent the fracton value to + # calculate the correct decimalpoint. + if unit_mult == '2': # thinking of Bitcoins + unit_mult = '0.01' + if unit_mult == '1': + unit_mult = '0.10' + if unit_mult == '-1': + unit_mult = '10' + if unit_mult == '-2': # Japan Yen + unit_mult = '100' + if unit_mult == '-3': + unit_mult = '1000' + if unit_mult == '-4': + unit_mult = '10000' + if unit_mult == '-5': + unit_mult = '100000' + if unit_mult == '-6': # indian rupies + unit_mult = '1000000' + unit_mult = float(unit_mult) # convert to float + # calculate the Currency to CHF: + foreign_value = 1 / value + foreign_value *= unit_mult + value = value / unit_mult + # truncate it to decimal values provided by the xml: + foreign_value_round = round(foreign_value, 5) + # Print nice setup of all calculated currencys for development: + # print("date:", date, " 1 ", target_currency, " costs: ", + # CHFvalue, "CHF and 1 ", base_currency, " costs: ", + # FOREIGNvalue_round, target_currency) + exchange_rates.update( + {target_currency: foreign_value_round}) + # Print the Dictionary: + # print(exchange_rates) else: - # shift left by 2 digits with "/" - # https://stackoverflow.com/questions/8362792/ - # because some currencys differ widly from CHF - unit_mult = item.find(observation_path + - 'cb:unit_mult', ns).text - # unit_mult defaults to '0' so we check for 8 decimal - # values (2..-6) they represent the fracton value to - # calculate the correct decimalpoint. - if unit_mult == '2': # thinking of Bitcoins - unit_mult = '0.01' - if unit_mult == '1': - unit_mult = '0.10' - if unit_mult == '-1': - unit_mult = '10' - if unit_mult == '-2': # Japan Yen - unit_mult = '100' - if unit_mult == '-3': - unit_mult = '1000' - if unit_mult == '-4': - unit_mult = '10000' - if unit_mult == '-5': - unit_mult = '100000' - if unit_mult == '-6': # indian rupies - unit_mult = '1000000' - unit_mult = float(unit_mult) # convert to float - # calculate the Currency to CHF: - foreign_value = 1 / value - foreign_value *= unit_mult - value = value / unit_mult - # truncate it to decimal values provided by the xml: - foreign_value_round = round(foreign_value, 5) - # Print nice setup of all calculated currencys for development: - # print("date:", date, " 1 ", target_currency, " costs: ", - # CHFvalue, "CHF and 1 ", base_currency, " costs: ", - # FOREIGNvalue_round, target_currency) - exchange_rates.update( - {target_currency: foreign_value_round}) - # Print the Dictionary: - # print(exchange_rates) - else: - break - return(exchange_rates, today) + continue + return(exchange_rates, today) diff --git a/django/didgeridoo/currencies/templates/currencies/index.html b/django/didgeridoo/currencies/templates/currencies/index.html index de264d1..d29a52d 100644 --- a/django/didgeridoo/currencies/templates/currencies/index.html +++ b/django/didgeridoo/currencies/templates/currencies/index.html @@ -14,13 +14,13 @@ DATE RATE - + {% for currency in currency_USD_list %} + {{ currency.date.date }} {{ currency.exchange_rate_to_chf }} - + {% endfor %} - {% else %}

        @@ -34,13 +34,13 @@ DATE RATE - + {% for currency in currency_EUR_list %} + {{ currency.date.date }} {{ currency.exchange_rate_to_chf }} - + {% endfor %} - {% else %}

        @@ -54,11 +54,12 @@ DATE RATE - + {% for currency in currency_JPY_list %} + {{ currency.date.date }} {{ currency.exchange_rate_to_chf }} - + {% endfor %} @@ -74,11 +75,12 @@ DATE RATE - + {% for currency in currency_GBP_list %} + {{ currency.date.date }} {{ currency.exchange_rate_to_chf }} - + {% endfor %} diff --git a/django/didgeridoo/currencies/views.py b/django/didgeridoo/currencies/views.py index b4a6fe9..d19f3e8 100644 --- a/django/didgeridoo/currencies/views.py +++ b/django/didgeridoo/currencies/views.py @@ -12,67 +12,71 @@ def currencies(request): # prepares the view all dynamicaly. # It can grow in terms of more Currencies over time automaticaly. today = '' - raw_data = '' - raw_data, today = exchange_rates.get_exchange_rate() - print('views raw_data: ', raw_data) # assert False + raw_data = [] + try: + raw_data, today = exchange_rates.get_exchange_rate() + except Exception as e: + print('views raw_data: ', raw_data, 'error:', e) # assert False message_no = "Already querried today: " message_yes = " Updated successfully: " - for currency, rate in raw_data.items(): - if ExchangeRate.objects.filter( - date__date=today, - name__name=currency): - message_no += currency + ", " - # A: https://stackoverflow.com/a/27802801/4061870 - else: - if ExchangeRate_date.objects.filter(date=today)[:1]: - try: - # lustigerweise gibt .values() den value und die id - # zurück. Ohne .values() gibts nur den "value" - date_dict = ExchangeRate_date.objects.filter( - date=today).values() - except Exception as e: - print('exdate_exists %s (%s) on %s' - % (e, type(e), today)) + if raw_data: + print(raw_data) + for currency, rate in raw_data.items(): + if ExchangeRate.objects.filter( + date__date=today, + name__name=currency): + message_no += currency + ", " + # A: https://stackoverflow.com/a/27802801/4061870 else: + if ExchangeRate_date.objects.filter(date=today)[:1]: + try: + # lustigerweise gibt .values() den value und die id + # zurück. Ohne .values() gibts nur den "value" + date_dict = ExchangeRate_date.objects.filter( + date=today).values() + except Exception as e: + print('exdate_exists %s (%s) on %s' + % (e, type(e), today)) + else: + try: + exdate = ExchangeRate_date.objects.create( + date=today) + exdate.save() + except Exception as e: + print('exdate_not_exists %s (%s) for %s' + % (e, type(e), today)) + if ExchangeRate_name.objects.filter( + name=currency)[:1]: + try: + name_dict = ExchangeRate_name.objects.filter( + name=currency).values() + except Exception as e: + print('exname_exists %s (%s) on %s' + % (e, type(e), currency)) + else: + try: + exname = ExchangeRate_name.objects.create( + name=currency) + exname.save() + except Exception as e: + print('exname_not_exists %s (%s) on %s' + % (e, type(e), currency)) try: - exdate = ExchangeRate_date.objects.create( - date=today) - exdate.save() - except Exception as e: - print('exdate_not_exists %s (%s) for %s' - % (e, type(e), today)) - if ExchangeRate_name.objects.filter( - name=currency)[:1]: - try: - name_dict = ExchangeRate_name.objects.filter( - name=currency).values() - except Exception as e: - print('exname_exists %s (%s) on %s' - % (e, type(e), currency)) - else: - try: - exname = ExchangeRate_name.objects.create( - name=currency) - exname.save() - except Exception as e: - print('exname_not_exists %s (%s) on %s' - % (e, type(e), currency)) - try: - exrate = ExchangeRate.objects.create( - # name_id=name_id, - name_id=ExchangeRate_name.objects.get( - name=currency).id, - # date_id=date_id, - date_id=ExchangeRate_date.objects.get( - date=today).id, - exchange_rate_to_chf=rate, - ) - exrate.save() - message_yes += currency + ", " + exrate = ExchangeRate.objects.create( + # name_id=name_id, + name_id=ExchangeRate_name.objects.get( + name=currency).id, + # date_id=date_id, + date_id=ExchangeRate_date.objects.get( + date=today).id, + exchange_rate_to_chf=rate, + ) + exrate.save() + message_yes += currency + ", " - except Exception as e: - print('exrate_create %s (%s) on %s for %s' - % (e, type(e), currency, today)) + except Exception as e: + print('exrate_create %s (%s) on %s for %s' + % (e, type(e), currency, today)) # prepare messages: # python can not swap a char insinde a sting so i have