From 64c97e22b77007277f8ffb9027d7bfcb5c20596a Mon Sep 17 00:00:00 2001 From: Samuel Zielke Date: Fri, 3 May 2024 19:32:22 +0200 Subject: [PATCH] Edit API and Form --- main/models.py | 12 +++ main/templates/main/index.html | 180 +++++++++++++++++++++++++-------- 2 files changed, 149 insertions(+), 43 deletions(-) diff --git a/main/models.py b/main/models.py index 387ad8b..d1d8d76 100644 --- a/main/models.py +++ b/main/models.py @@ -46,26 +46,38 @@ class service(models.Model): date_1 = models.DateField(auto_now_add=False, null=True) time_1 = models.TimeField(auto_now_add=False, null=True) type_1 = models.IntegerField(auto_created=False, choices=TYPES, null=True) + sonder_1 = models.BooleanField(default=False) + sonder_1_name = models.CharField(max_length=50, null=True) speaker_1 = models.ForeignKey(contributors, on_delete=models.CASCADE, related_name="speaker_1", null=True) date_2 = models.DateField(auto_now_add=False, null=True) time_2 = models.TimeField(auto_now_add=False, null=True) type_2 = models.IntegerField(auto_created=False, choices=TYPES, null=True) + sonder_2 = models.BooleanField(default=False) + sonder_2_name = models.CharField(max_length=50, null=True) speaker_2 = models.ForeignKey(contributors, on_delete=models.CASCADE, related_name="speaker_2", null=True) date_3 = models.DateField(auto_now_add=False, null=True) time_3 = models.TimeField(auto_now_add=False, null=True) type_3 = models.IntegerField(auto_created=False, choices=TYPES, null=True) + sonder_3 = models.BooleanField(default=False) + sonder_3_name = models.CharField(max_length=50, null=True) speaker_3 = models.ForeignKey(contributors, on_delete=models.CASCADE, related_name="speaker_3", null=True) date_4 = models.DateField(auto_now_add=False, null=True) time_4 = models.TimeField(auto_now_add=False, null=True) type_4 = models.IntegerField(auto_created=False, choices=TYPES, null=True) + sonder_4 = models.BooleanField(default=False) + sonder_4_name = models.CharField(max_length=50, null=True) speaker_4 = models.ForeignKey(contributors, on_delete=models.CASCADE, related_name="speaker_4", null=True) date_5 = models.DateField(auto_now_add=False, null=True) time_5 = models.TimeField(auto_now_add=False, null=True) type_5 = models.IntegerField(auto_created=False, choices=TYPES, null=True) + sonder_5 = models.BooleanField(default=False) + sonder_5_name = models.CharField(max_length=50, null=True) speaker_5 = models.ForeignKey(contributors, on_delete=models.CASCADE, related_name="speaker_5", null=True) date_6 = models.DateField(auto_now_add=False, null=True) time_6 = models.TimeField(auto_now_add=False, null=True) type_6 = models.IntegerField(auto_created=False, choices=TYPES, null=True) + sonder_6 = models.BooleanField(default=False) + sonder_6_name = models.CharField(max_length=50, null=True) speaker_6 = models.ForeignKey(contributors, on_delete=models.CASCADE, related_name="speaker_6", null=True) def __str__(self): diff --git a/main/templates/main/index.html b/main/templates/main/index.html index 21120a5..86c390c 100644 --- a/main/templates/main/index.html +++ b/main/templates/main/index.html @@ -30,7 +30,8 @@ #other { margin: 0.250rem 3.000rem; } #technik { margin: 0 3.000rem; } #header { padding-bottom: 2rem; } - select { width: 7rem;} + select { width: 8rem;} + input { width: 8rem;}
@@ -117,20 +134,47 @@
- + + + + + + + + + + + + + - + - + - + - + - +
+ Datum und Zeit + + Ort + + Leiter +
1. Dienst
- +
+ + + +
+
+ + + +
2. Dienst
- +
+ + + +
+
+ + + +
+
3. Dienst
- +
+ + + +
+
+ + + +
+
4. Dienst
- +
+ + + +
+
+ + + +
+
5. Dienst
- +
+ + + +
+
+ + + +
+
6. Dienst
- +
+ + + +
+
+ + + +
+