From d4815129df666fa7d577c9ed70769f9e9b58d2f5 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 2 Nov 2020 10:58:20 +0100 Subject: [PATCH] some new fields for Project Model --- input/migrations/0034_auto_20201102_0913.py | 23 ++++ input/migrations/0035_auto_20201102_0944.py | 138 ++++++++++++++++++++ input/models.py | 19 ++- 3 files changed, 175 insertions(+), 5 deletions(-) create mode 100644 input/migrations/0034_auto_20201102_0913.py create mode 100644 input/migrations/0035_auto_20201102_0944.py diff --git a/input/migrations/0034_auto_20201102_0913.py b/input/migrations/0034_auto_20201102_0913.py new file mode 100644 index 0000000..ad69eee --- /dev/null +++ b/input/migrations/0034_auto_20201102_0913.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.1 on 2020-11-02 09:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('input', '0033_auto_20201029_1338'), + ] + + operations = [ + migrations.AddField( + model_name='project', + name='description', + field=models.CharField(max_length=500, null=True, verbose_name='Kurzbeschreibung'), + ), + migrations.AlterField( + model_name='project', + name='name', + field=models.CharField(max_length=200, verbose_name='Name des Projekts'), + ), + ] diff --git a/input/migrations/0035_auto_20201102_0944.py b/input/migrations/0035_auto_20201102_0944.py new file mode 100644 index 0000000..7ad1185 --- /dev/null +++ b/input/migrations/0035_auto_20201102_0944.py @@ -0,0 +1,138 @@ +# Generated by Django 3.1.1 on 2020-11-02 09:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('input', '0034_auto_20201102_0913'), + ] + + operations = [ + migrations.AddField( + model_name='project', + name='group', + field=models.CharField(blank=True, max_length=2000, null=True, verbose_name='Mitorganisierende'), + ), + migrations.AddField( + model_name='project', + name='location', + field=models.CharField(blank=True, max_length=2000, null=True, verbose_name='Ort/Adresse/Location'), + ), + migrations.AddField( + model_name='project', + name='otrs', + field=models.CharField(max_length=300, null=True, verbose_name='OTRS-Link'), + ), + migrations.AddField( + model_name='project', + name='page', + field=models.CharField(blank=True, max_length=2000, null=True, verbose_name='Link zur Projektseite'), + ), + migrations.AddField( + model_name='project', + name='plan', + field=models.CharField(blank=True, max_length=2000, null=True, verbose_name='Link zum Förderplan'), + ), + migrations.AddField( + model_name='project', + name='urls', + field=models.CharField(blank=True, max_length=2000, null=True, verbose_name='Weitere Links'), + ), + migrations.AlterField( + model_name='businesscard', + name='email', + field=models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse'), + ), + migrations.AlterField( + model_name='businesscard', + name='realname', + field=models.CharField(max_length=200, null=True, verbose_name='Name / Hauptansprechperson'), + ), + migrations.AlterField( + model_name='email', + name='email', + field=models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse'), + ), + migrations.AlterField( + model_name='email', + name='realname', + field=models.CharField(max_length=200, null=True, verbose_name='Name / Hauptansprechperson'), + ), + migrations.AlterField( + model_name='honorarycertificate', + name='email', + field=models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse'), + ), + migrations.AlterField( + model_name='honorarycertificate', + name='realname', + field=models.CharField(max_length=200, null=True, verbose_name='Name / Hauptansprechperson'), + ), + migrations.AlterField( + model_name='ifg', + name='email', + field=models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse'), + ), + migrations.AlterField( + model_name='ifg', + name='realname', + field=models.CharField(max_length=200, null=True, verbose_name='Name / Hauptansprechperson'), + ), + migrations.AlterField( + model_name='library', + name='email', + field=models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse'), + ), + migrations.AlterField( + model_name='library', + name='realname', + field=models.CharField(max_length=200, null=True, verbose_name='Name / Hauptansprechperson'), + ), + migrations.AlterField( + model_name='list', + name='email', + field=models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse'), + ), + migrations.AlterField( + model_name='list', + name='realname', + field=models.CharField(max_length=200, null=True, verbose_name='Name / Hauptansprechperson'), + ), + migrations.AlterField( + model_name='literature', + name='email', + field=models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse'), + ), + migrations.AlterField( + model_name='literature', + name='realname', + field=models.CharField(max_length=200, null=True, verbose_name='Name / Hauptansprechperson'), + ), + migrations.AlterField( + model_name='project', + name='email', + field=models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse'), + ), + migrations.AlterField( + model_name='project', + name='realname', + field=models.CharField(max_length=200, null=True, verbose_name='Name / Hauptansprechperson'), + ), + migrations.AlterField( + model_name='project', + name='start', + field=models.DateField(blank=True, null=True, verbose_name='Startdatum'), + ), + migrations.AlterField( + model_name='travel', + name='email', + field=models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse'), + ), + migrations.AlterField( + model_name='travel', + name='realname', + field=models.CharField(max_length=200, null=True, verbose_name='Name / Hauptansprechperson'), + ), + ] diff --git a/input/models.py b/input/models.py index 0b8b141..02dbcdb 100644 --- a/input/models.py +++ b/input/models.py @@ -6,9 +6,8 @@ from .settings import ACCOUNTS class Volunteer(models.Model): - realname = models.CharField(max_length=200, null=True) - email = models.CharField(max_length=200, null=True) - # username = models.CharField(max_length=200, null=True) + realname = models.CharField(max_length=200, null=True, verbose_name="Name / Hauptansprechperson") + email = models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse') # the following Fields are not supposed to be edited by users granted = models.BooleanField(null=True) @@ -43,9 +42,19 @@ class Extern(Volunteer): abstract = True class Project(Volunteer): - name = models.CharField(max_length=200) - start = models.DateField('Startdatum', null=True) + name = models.CharField(max_length=200, verbose_name='Name des Projekts') + description = models.CharField(max_length=500, verbose_name="Kurzbeschreibung", null=True) + start = models.DateField('Startdatum', null=True, blank= True) end = models.DateField('Erwartetes Projektende', null=True) + otrs = models.CharField(max_length=300, null=True, verbose_name='OTRS-Link') + plan = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Link zum Förderplan") + page = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Link zur Projektseite") + urls = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Weitere Links") + group = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Mitorganisierende") + location = models.CharField(max_length=2000, null=True, blank=True, verbose_name="Ort/Adresse/Location") + participants_estimated = models.IntegerField(blank=True, null=True, verbose_name='Teilnehmende angefragt') + participants_real = models.IntegerField(blank=True, null=True, verbose_name='Teilnehmende ausgezählt') + account = models.CharField('Kostenstelle', max_length=5, choices=ACCOUNTS.items(), null=True,)