start new app donar

This commit is contained in:
Götz 2017-10-03 14:10:06 +02:00
parent 6d912c8a25
commit 5332a4ac4d
13 changed files with 110 additions and 69 deletions

View File

View File

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View File

@ -0,0 +1,5 @@
from django.apps import AppConfig
class DonarConfig(AppConfig):
name = 'apps.donar'

View File

@ -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)

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

View File

@ -5,7 +5,8 @@
{% block content %}
<div class="container">
<div class="row">
<div class="col m-2 p-3 border border-dark rounded">
<div class="col p-2">
<div class="p-3 border border-dark rounded bg-light text-dark">
{% if feki_menu %}
<h2>{{ feki_menu.location }}</h2>
<p>{{ feki_menu.date }}</p>
@ -17,7 +18,9 @@
<p>Die Feki Mensa hat heute geschlossen :(</p>
{% endif %}
</div>
<div class="col m-2 p-3 border border-dark rounded">
</div>
<div class="col p-2">
<div class="p-3 border border-dark rounded bg-light text-dark">
{% if austr_menu %}
<h2>{{ austr_menu.location }}</h2>
<p>{{ austr_menu.date }}</p>
@ -29,7 +32,11 @@
<p>Die Austr Mensa hat heute geschlossen :(</p>
{% endif %}
</div>
<div class="col m-2 p-3 border border-dark rounded">
</div>
</div>
<div class="row">
<div class="col p-2">
<div class="p-3 border border-dark rounded bg-light text-dark">
{% if erba_cafete %}
<h2>{{ erba_cafete.location }}</h2>
<p>{{ erba_cafete.date }}</p>
@ -42,7 +49,9 @@
<p> Nein? Dann ist die Erba Cafete wohl heute geschlossen :(</p>
{% endif %}
</div>
<div class="col m-2 p-3 border border-dark rounded">
</div>
<div class="col p-2">
<div class="p-3 border border-dark rounded bg-light text-dark">
{% if markus_cafete %}
<h2>{{ markus_cafete.location }}</h2>
<p>{{ markus_cafete.date }}</p>
@ -56,8 +65,10 @@
{% endif %}
</div>
</div>
</div>
<div class="row">
<div class="col m-2 p-3 border border-dark rounded">
<div class="col p-2">
<div class="p-3 border border-dark rounded bg-light text-dark">
<h2>Happy Hour Guide von Feki.de</h2>
{% if happy_hours %}
<table class="table">
@ -84,5 +95,6 @@
</div>
</div>
</div>
</div>
{% endblock %}