From 5332a4ac4db8e613a70f3856999482af0aa2e5e9 Mon Sep 17 00:00:00 2001 From: michigg Date: Tue, 3 Oct 2017 14:10:06 +0200 Subject: [PATCH] start new app donar --- ofu_app/apps/donar/__init__.py | 0 ofu_app/apps/donar/admin.py | 3 + ofu_app/apps/donar/apps.py | 5 + ofu_app/apps/donar/management/__init__.py | 0 ofu_app/apps/donar/migrations/__init__.py | 0 ofu_app/apps/donar/models.py | 15 ++ ofu_app/apps/donar/tests.py | 3 + ofu_app/apps/donar/utils/__init__.py | 0 ofu_app/apps/donar/utils/parser/__init__.py | 0 ofu_app/apps/donar/views.py | 3 + .../__pycache__/settings.cpython-35.pyc | Bin 2873 -> 2873 bytes .../ofu_app/__pycache__/urls.cpython-35.pyc | Bin 1151 -> 1151 bytes ofu_app/templates/food/daily_food.jinja | 150 ++++++++++-------- 13 files changed, 110 insertions(+), 69 deletions(-) create mode 100644 ofu_app/apps/donar/__init__.py create mode 100644 ofu_app/apps/donar/admin.py create mode 100644 ofu_app/apps/donar/apps.py create mode 100644 ofu_app/apps/donar/management/__init__.py create mode 100644 ofu_app/apps/donar/migrations/__init__.py create mode 100644 ofu_app/apps/donar/models.py create mode 100644 ofu_app/apps/donar/tests.py create mode 100644 ofu_app/apps/donar/utils/__init__.py create mode 100644 ofu_app/apps/donar/utils/parser/__init__.py create mode 100644 ofu_app/apps/donar/views.py diff --git a/ofu_app/apps/donar/__init__.py b/ofu_app/apps/donar/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ofu_app/apps/donar/admin.py b/ofu_app/apps/donar/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/ofu_app/apps/donar/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/ofu_app/apps/donar/apps.py b/ofu_app/apps/donar/apps.py new file mode 100644 index 0000000..fd3854b --- /dev/null +++ b/ofu_app/apps/donar/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class DonarConfig(AppConfig): + name = 'apps.donar' diff --git a/ofu_app/apps/donar/management/__init__.py b/ofu_app/apps/donar/management/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ofu_app/apps/donar/migrations/__init__.py b/ofu_app/apps/donar/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ofu_app/apps/donar/models.py b/ofu_app/apps/donar/models.py new file mode 100644 index 0000000..bf50e3f --- /dev/null +++ b/ofu_app/apps/donar/models.py @@ -0,0 +1,15 @@ +from django.db import models + +MAX_LENGTH = 60 + + +# Create your models here. +class Room(models.Model): + id = models.AutoField(primary_key=True) + key = models.CharField(max_length=MAX_LENGTH) + address = models.CharField(max_length=MAX_LENGTH) + building_key = models.CharField(max_length=MAX_LENGTH) + floor = models.CharField(max_length=MAX_LENGTH) + name = models.CharField(max_length=MAX_LENGTH) + orgname = models.CharField(max_length=MAX_LENGTH) + short = models.CharField(max_length=MAX_LENGTH) diff --git a/ofu_app/apps/donar/tests.py b/ofu_app/apps/donar/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/ofu_app/apps/donar/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/ofu_app/apps/donar/utils/__init__.py b/ofu_app/apps/donar/utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ofu_app/apps/donar/utils/parser/__init__.py b/ofu_app/apps/donar/utils/parser/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ofu_app/apps/donar/views.py b/ofu_app/apps/donar/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/ofu_app/apps/donar/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/ofu_app/ofu_app/__pycache__/settings.cpython-35.pyc b/ofu_app/ofu_app/__pycache__/settings.cpython-35.pyc index 12c9f2aeae022e223d6a45255b518a49f54c9119..762742448880404171a6e8b6b7c942a6fe3089ae 100644 GIT binary patch delta 16 Xcmdlfwo{B_*%GD+vVr delta 16 Xcmdlfwo{B=i5kGCBpT delta 16 Xcmey*@t=cToR^o&^wOn`>=i5kFR%q( diff --git a/ofu_app/templates/food/daily_food.jinja b/ofu_app/templates/food/daily_food.jinja index 234a748..d096d93 100644 --- a/ofu_app/templates/food/daily_food.jinja +++ b/ofu_app/templates/food/daily_food.jinja @@ -5,82 +5,94 @@ {% block content %}
-
- {% if feki_menu %} -

{{ feki_menu.location }}

-

{{ feki_menu.date }}

- {% for single_food in feki_menu.menu.all %} -

{{ single_food.name }}

- {% endfor %} +
+
+ {% if feki_menu %} +

{{ feki_menu.location }}

+

{{ feki_menu.date }}

+ {% for single_food in feki_menu.menu.all %} +

{{ single_food.name }}

+ {% endfor %} - {% else %} -

Die Feki Mensa hat heute geschlossen :(

- {% endif %} + {% else %} +

Die Feki Mensa hat heute geschlossen :(

+ {% endif %} +
-
- {% if austr_menu %} -

{{ austr_menu.location }}

-

{{ austr_menu.date }}

- {% for single_food in austr_menu.menu.all %} -

{{ single_food.name }}

- {% endfor %} +
+
+ {% if austr_menu %} +

{{ austr_menu.location }}

+

{{ austr_menu.date }}

+ {% for single_food in austr_menu.menu.all %} +

{{ single_food.name }}

+ {% endfor %} - {% else %} -

Die Austr Mensa hat heute geschlossen :(

- {% endif %} -
-
- {% if erba_cafete %} -

{{ erba_cafete.location }}

-

{{ erba_cafete.date }}

- {% for single_food in erba_cafete.menu.all %} -

{{ single_food.name }}

- {% endfor %} - - {% else %} -

Ist heute Freitag?

-

Nein? Dann ist die Erba Cafete wohl heute geschlossen :(

- {% endif %} -
-
- {% if markus_cafete %} -

{{ markus_cafete.location }}

-

{{ markus_cafete.date }}

- {% for single_food in markus_cafete.menu.all %} -

{{ single_food.name }}

- {% endfor %} - - {% else %} -

Ist heute Freitag?

-

Nein? Dann ist die Markus Cafete wohl heute geschlossen :(

- {% endif %} + {% else %} +

Die Austr Mensa hat heute geschlossen :(

+ {% endif %} +
-
-

Happy Hour Guide von Feki.de

- {% if happy_hours %} - - - - - - - - - - {% for happy_hour in happy_hours %} - - - - - +
+
+ {% if erba_cafete %} +

{{ erba_cafete.location }}

+

{{ erba_cafete.date }}

+ {% for single_food in erba_cafete.menu.all %} +

{{ single_food.name }}

{% endfor %} -
-
LocationTimeDescription
{{ happy_hour.location }}{{ happy_hour.time }}{{ happy_hour.description }}
- {% else %} -

Leider gibt es heute keine Happy Hours :(

- {% endif %} + + {% else %} +

Ist heute Freitag?

+

Nein? Dann ist die Erba Cafete wohl heute geschlossen :(

+ {% endif %} +
+
+
+
+ {% if markus_cafete %} +

{{ markus_cafete.location }}

+

{{ markus_cafete.date }}

+ {% for single_food in markus_cafete.menu.all %} +

{{ single_food.name }}

+ {% endfor %} + + {% else %} +

Ist heute Freitag?

+

Nein? Dann ist die Markus Cafete wohl heute geschlossen :(

+ {% endif %} +
+
+
+
+
+
+

Happy Hour Guide von Feki.de

+ {% if happy_hours %} + + + + + + + + + + {% for happy_hour in happy_hours %} + + + + + + {% endfor %} + +
LocationTimeDescription
{{ happy_hour.location }}{{ happy_hour.time }}{{ happy_hour.description }}
+ {% else %} +

Leider gibt es heute keine Happy Hours :(

+ {% endif %} +