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 = [