forked from beba/foerderbarometer
added new field survey_mail_date
This commit is contained in:
parent
ada102a516
commit
f373fceaab
3
TODO
3
TODO
|
@ -16,6 +16,3 @@ other known problems:
|
|||
missing features:
|
||||
|
||||
- every modell should store the date when the surveymail was actually send.
|
||||
|
||||
- field which contains URLs should check during validation if there is actually an URL
|
||||
and not just random strings to prevent wrong input.
|
||||
|
|
|
@ -22,7 +22,7 @@ class ProjectForm(FdbForm):
|
|||
class Meta:
|
||||
model = Project
|
||||
exclude = ('pid', 'granted', 'granted_date', 'realname', 'email',\
|
||||
'end_mail_send', 'status', 'persons')
|
||||
'end_mail_send', 'status', 'persons', 'survey_mail_date')
|
||||
widgets = {'start': AdminDateWidget(),
|
||||
'end': AdminDateWidget(),}
|
||||
|
||||
|
@ -37,7 +37,7 @@ class ExternForm(FdbForm):
|
|||
|
||||
class Meta:
|
||||
model = Extern
|
||||
exclude = ('granted', 'granted_date', 'survey_mail_send', 'service_id')
|
||||
exclude = ('granted', 'granted_date', 'survey_mail_send', 'service_id', 'survey_mail_date')
|
||||
|
||||
INTERN_CHOICES = {'PRO': 'Projektsteckbrief',
|
||||
'HON': 'Ehrenamtsbescheinigung, Akkreditierung oder Redaktionsbestätigung',
|
||||
|
@ -49,13 +49,13 @@ class InternForm(FdbForm):
|
|||
|
||||
class Meta:
|
||||
model = Volunteer
|
||||
exclude = ('granted', 'granted_date', 'survey_mail_send')
|
||||
exclude = ('granted', 'granted_date', 'survey_mail_send', 'survey_mail_date')
|
||||
|
||||
class TravelForm(FdbForm):
|
||||
# TODO: add some javascript to show/hide other-field
|
||||
class Meta:
|
||||
model = Travel
|
||||
exclude = ('granted', 'granted_date', 'survey_mail_send', 'realname', 'email',)
|
||||
exclude = ('granted', 'granted_date', 'survey_mail_send', 'realname', 'email', 'survey_mail_date')
|
||||
widgets = {'checkin': AdminDateWidget(),
|
||||
'checkout': AdminDateWidget(),}
|
||||
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
# Generated by Django 3.1.1 on 2021-04-12 11:42
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('input', '0058_auto_20210412_0946'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='businesscard',
|
||||
name='survey_mail_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='email',
|
||||
name='survey_mail_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='honorarycertificate',
|
||||
name='survey_mail_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='ifg',
|
||||
name='survey_mail_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='library',
|
||||
name='survey_mail_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='list',
|
||||
name='survey_mail_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='literature',
|
||||
name='survey_mail_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='project',
|
||||
name='survey_mail_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='travel',
|
||||
name='survey_mail_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am'),
|
||||
),
|
||||
]
|
|
@ -16,7 +16,8 @@ class Volunteer(models.Model):
|
|||
granted = models.BooleanField(null=True)
|
||||
granted_date = models.DateField(null=True)
|
||||
survey_mail_send = models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken')
|
||||
|
||||
survey_mail_date = models.DateField(verbose_name='Umfragemail wurde verschickt am', null=True, blank=True)
|
||||
|
||||
@classmethod
|
||||
def set_granted(cl, key, b):
|
||||
obj = cl.objects.get(pk=key)
|
||||
|
|
Loading…
Reference in New Issue