added mail_state to all objects, added filters regarding sendmail.py

This commit is contained in:
Benni Bärmann 2022-11-30 00:09:10 +00:00
parent 9b9209f2b5
commit d2d48c1a82
125 changed files with 482 additions and 32 deletions

3
.gitignore vendored Normal file → Executable file
View file

@ -1,7 +1,8 @@
# secret passwords and so # secret passwords and so
/secrets.json /secrets.json
/staticfiles /staticfiles
/foerderbarometer/settings.py # /foerderbarometer/settings.py
/foerderbarometer/*settings*
/nohup.out /nohup.out
/logfile /logfile
*~ *~

0
LICENSE Normal file → Executable file
View file

0
README.md Normal file → Executable file
View file

0
TODO Normal file → Executable file
View file

0
foerderbarometer/__init__.py Normal file → Executable file
View file

0
foerderbarometer/asgi.py Normal file → Executable file
View file

0
foerderbarometer/settings.py_old Normal file → Executable file
View file

0
foerderbarometer/settings_development.py Normal file → Executable file
View file

0
foerderbarometer/settings_mariadb_development.py Normal file → Executable file
View file

4
foerderbarometer/settings_production.py Normal file → Executable file
View file

@ -111,8 +111,8 @@ WSGI_APPLICATION = 'foerderbarometer.wsgi.application'
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'fdb', 'NAME': 'fdbdevel',
'USER': 'fdb', 'USER': 'fdbdevel',
'PASSWORD': get_secret('DATABASE_PASSWORD'), 'PASSWORD': get_secret('DATABASE_PASSWORD'),
'HOST': '10.0.6.7', # Or an IP Address that your database is hosted on 'HOST': '10.0.6.7', # Or an IP Address that your database is hosted on
# 'PORT': '3306', # 'PORT': '3306',

0
foerderbarometer/urls.py Normal file → Executable file
View file

0
foerderbarometer/wsgi.py Normal file → Executable file
View file

0
input/__init__.py Normal file → Executable file
View file

0
input/admin.py Normal file → Executable file
View file

0
input/apps.py Normal file → Executable file
View file

0
input/fixtures/accounts.json Normal file → Executable file
View file

6
input/forms.py Normal file → Executable file
View file

@ -72,13 +72,13 @@ class TravelForm(FdbForm):
exclude = ('granted', 'granted_date', 'survey_mail_send', 'realname', 'email', 'survey_mail_date', 'project', 'request_url', 'payed_for_hotel_by', 'payed_for_travel_by', 'intern_notes' ) exclude = ('granted', 'granted_date', 'survey_mail_send', 'realname', 'email', 'survey_mail_date', 'project', 'request_url', 'payed_for_hotel_by', 'payed_for_travel_by', 'intern_notes' )
widgets = {'checkin': AdminDateWidget(), widgets = {'checkin': AdminDateWidget(),
'checkout': AdminDateWidget(),} 'checkout': AdminDateWidget(),}
fields = ['project_name', 'transport', 'travelcost', 'checkin', 'checkout', 'hotel', 'notes'] fields = ['project_name', 'transport', 'travelcost', 'checkin', 'checkout', 'hotel', 'notes', 'mail_state']
class LibraryForm(FdbForm): class LibraryForm(FdbForm):
class Meta: class Meta:
model = Library model = Library
fields = ['cost', 'library', 'duration', 'notes'] fields = ['cost', 'library', 'duration', 'notes', 'survey_mail_send']
exclude = ['intern_notes'] exclude = ['intern_notes']
class HonoraryCertificateForm(FdbForm): class HonoraryCertificateForm(FdbForm):
@ -139,7 +139,7 @@ class BusinessCardForm(CheckForm):
class Meta: class Meta:
model = BusinessCard model = BusinessCard
exclude = ['intern_notes'] exclude = ['intern_notes']
fields = ['project', 'data', 'variant', 'url_of_pic', 'sent_to'] fields = ['project', 'data', 'variant', 'url_of_pic', 'sent_to', 'mail_state']
class Media: class Media:
js = ('dropdown/js/base.js',) js = ('dropdown/js/base.js',)

61
input/management/commands/sendmails.py Normal file → Executable file
View file

@ -44,6 +44,7 @@ class Command(BaseCommand):
msg = EmailMultiAlternatives(subject, text_content, from_email, [to], bcc=[SURVEY_EMAIL]) msg = EmailMultiAlternatives(subject, text_content, from_email, [to], bcc=[SURVEY_EMAIL])
msg.attach_alternative(html_content, "text/html") msg.attach_alternative(html_content, "text/html")
msg.send() msg.send()
#print('survey mail would have been send')
#survey_mail = EmailMessage('Dein Feedback zur Förderung durch Wikimedia Deutschland', #survey_mail = EmailMessage('Dein Feedback zur Förderung durch Wikimedia Deutschland',
# mail_template.render(context), # mail_template.render(context),
@ -56,12 +57,19 @@ class Command(BaseCommand):
print(f'send surveylinkemail to {email}...') print(f'send surveylinkemail to {email}...')
''' the db entry mail_state was added. Useful when migrating databases. first delete the entry, then makemigrations
then migrate.. after that, recreate the entry with default END, after that makemigrations and migrate.
now all entries have the value END. after that rewrite the default to NONE in models.py, then makemigrations
and migrate again, to have NONE as default for all new queries. '''
def end_of_projects_reached(self): def end_of_projects_reached(self):
''' end of project reached ''' ''' end of project reached '''
# get all projects which ended # get all projects which ended
old = Project.objects.filter(end__lt = date.today())\ old = Project.objects.filter(end__lt = date.today())\
.exclude(end_mail_send = True) .exclude(end_mail_send = True)\
.filter(mail_state = 'NONE')
txt_mail_template = get_template('input/if_end_of_project.txt') txt_mail_template = get_template('input/if_end_of_project.txt')
html_mail_template = get_template('input/if_end_of_project.html') html_mail_template = get_template('input/if_end_of_project.html')
@ -69,6 +77,7 @@ class Command(BaseCommand):
for project in old: for project in old:
context = {'project': project} context = {'project': project}
context['URLPREFIX'] = settings.URLPREFIX context['URLPREFIX'] = settings.URLPREFIX
try: try:
subject, from_email, to = 'Projektende erreicht', IF_EMAIL, IF_EMAIL subject, from_email, to = 'Projektende erreicht', IF_EMAIL, IF_EMAIL
text_content = txt_mail_template.render(context) text_content = txt_mail_template.render(context)
@ -76,6 +85,7 @@ class Command(BaseCommand):
msg = EmailMultiAlternatives(subject, text_content, from_email, [to]) msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html") msg.attach_alternative(html_content, "text/html")
msg.send() msg.send()
#print('end of project mail would have been sent')
#send_mail('Projektende erreicht', #send_mail('Projektende erreicht',
# mail_template.render(context), # mail_template.render(context),
@ -83,7 +93,11 @@ class Command(BaseCommand):
# [IF_EMAIL], # [IF_EMAIL],
# fail_silently=False) # fail_silently=False)
project.end_mail_send = True project.end_mail_send = True
project.mail_state = 'INF'
try:
project.save() project.save()
except:
print( 'For project', project, 'there is possibly no project.start (', project.start, ') class')
except BadHeaderError: except BadHeaderError:
self.stdout.write(self.style.ERROR('Invalid header found.')) self.stdout.write(self.style.ERROR('Invalid header found.'))
@ -94,8 +108,8 @@ class Command(BaseCommand):
# get all projects where end was reached already, and send mails for the ones already set to status "ended" by the admins # get all projects where end was reached already, and send mails for the ones already set to status "ended" by the admins
approved_end = Project.objects.filter(status = 'END')\ approved_end = Project.objects.filter(status = 'END')\
.exclude(end_mail_send = False) .exclude(end_mail_send = False)\
print(approved_end) .filter(mail_state = 'INF')
txt_mail_template = get_template('input/if_end_of_project_approved.txt') txt_mail_template = get_template('input/if_end_of_project_approved.txt')
html_mail_template = get_template('input/if_end_of_project_approved.html') html_mail_template = get_template('input/if_end_of_project_approved.html')
@ -106,6 +120,8 @@ class Command(BaseCommand):
for project in approved_end: for project in approved_end:
context = {'project': project} context = {'project': project}
context['URLPREFIX'] = settings.URLPREFIX context['URLPREFIX'] = settings.URLPREFIX
try: try:
subject, from_email, to = 'Projektende erreicht', IF_EMAIL, project.email subject, from_email, to = 'Projektende erreicht', IF_EMAIL, project.email
text_content = txt_mail_template.render(context) text_content = txt_mail_template.render(context)
@ -113,14 +129,15 @@ class Command(BaseCommand):
msg = EmailMultiAlternatives(subject, text_content, from_email, [to]) msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html") msg.attach_alternative(html_content, "text/html")
msg.send() msg.send()
#print('if and of project approved mail would have been sent')
inform_subject, inform_from_email, inform_to = Projektorganisator*in wurde informiert', IF_EMAIL, IF_EMAIL inform_subject, inform_from_email, inform_to = 'Projektorganisator*in wurde informiert', IF_EMAIL, IF_EMAIL
inform_text_content = txt_informMail_template.render(context) inform_text_content = txt_informMail_template.render(context)
inform_html_content = html_informMail_template.render(context) inform_html_content = html_informMail_template.render(context)
inform_msg = EmailMultiAlternatives(inform_subject, inform_text_content, inform_from_email, [inform_to]) inform_msg = EmailMultiAlternatives(inform_subject, inform_text_content, inform_from_email, [inform_to])
inform_msg.attach_alternative(html_content, "text/html") inform_msg.attach_alternative(html_content, "text/html")
inform_msg.send() inform_msg.send()
#print('if end of project orginformed mail would have been sent')
#send_mail('Projektende erreicht', #send_mail('Projektende erreicht',
# mail_template.render(context), # mail_template.render(context),
@ -134,7 +151,11 @@ class Command(BaseCommand):
# fail_silently=False) # fail_silently=False)
project.end_mail_send = True project.end_mail_send = True
project.mail_state = 'END'
try:
project.save() project.save()
except:
print( 'For project', project, 'there is possibly no project.start (', project.start, ') class')
except BadHeaderError: except BadHeaderError:
self.stdout.write(self.style.ERROR('Invalid header found.')) self.stdout.write(self.style.ERROR('Invalid header found.'))
@ -145,7 +166,8 @@ class Command(BaseCommand):
# get all projects where end was reached already, and send mails for the ones where status was put to NOT by admins # get all projects where end was reached already, and send mails for the ones where status was put to NOT by admins
approved_notHappened = Project.objects.filter(status = 'NOT')\ approved_notHappened = Project.objects.filter(status = 'NOT')\
.exclude(end_mail_send = False) .exclude(end_mail_send = False)\
.filter(mail_state = 'INF')
html_mail_template = get_template('input/if_not_of_project_approved.html') html_mail_template = get_template('input/if_not_of_project_approved.html')
txt_mail_template = get_template('input/if_not_of_project_approved.txt') txt_mail_template = get_template('input/if_not_of_project_approved.txt')
@ -164,7 +186,7 @@ class Command(BaseCommand):
msg = EmailMultiAlternatives(subject, text_content, from_email, [to]) msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html") msg.attach_alternative(html_content, "text/html")
msg.send() msg.send()
#print('if not of project approved end mail would have been sent')
#send_mail('Projektende erreicht', #send_mail('Projektende erreicht',
@ -173,12 +195,13 @@ class Command(BaseCommand):
# [project.email], # [project.email],
# fail_silently=False) # fail_silently=False)
inform_subject, inform_from_email, inform_to = Projektorganisator*in wurde informiert', IF_EMAIL, IF_EMAIL inform_subject, inform_from_email, inform_to = 'Projektorganisator*in wurde informiert', IF_EMAIL, IF_EMAIL
inform_text_content = txt_informMail_template.render(context) inform_text_content = txt_informMail_template.render(context)
inform_html_content = html_informMail_template.render(context) inform_html_content = html_informMail_template.render(context)
inform_msg = EmailMultiAlternatives(inform_subject, inform_text_content, inform_from_email, [inform_to]) inform_msg = EmailMultiAlternatives(inform_subject, inform_text_content, inform_from_email, [inform_to])
inform_msg.attach_alternative(html_content, "text/html") inform_msg.attach_alternative(html_content, "text/html")
inform_msg.send() inform_msg.send()
#print('if not of project approved end mail orginformed would have been sent')
#send_mail('Projektorganisator*in wurde informiert', #send_mail('Projektorganisator*in wurde informiert',
# informMail_template.render(context), # informMail_template.render(context),
@ -187,6 +210,7 @@ class Command(BaseCommand):
# fail_silently=False) # fail_silently=False)
project.end_mail_send = True project.end_mail_send = True
project.mail_state = 'END'
project.save() project.save()
except BadHeaderError: except BadHeaderError:
self.stdout.write(self.style.ERROR('Invalid header found.')) self.stdout.write(self.style.ERROR('Invalid header found.'))
@ -221,7 +245,8 @@ class Command(BaseCommand):
supported = Library.objects.filter(granted=True)\ supported = Library.objects.filter(granted=True)\
.filter(granted_date__lt = date.today() - timedelta(days=14))\ .filter(granted_date__lt = date.today() - timedelta(days=14))\
.exclude(survey_mail_send=True) .exclude(survey_mail_send=True)\
.exclude(mail_state = 'END')
self.surveymails_to_object(supported,name='library') self.surveymails_to_object(supported,name='library')
def surveymails_to_hon(self): def surveymails_to_hon(self):
@ -229,7 +254,8 @@ class Command(BaseCommand):
supported = HonoraryCertificate.objects.filter(granted=True)\ supported = HonoraryCertificate.objects.filter(granted=True)\
.filter(granted_date__lt = date.today() - timedelta(days=14))\ .filter(granted_date__lt = date.today() - timedelta(days=14))\
.exclude(survey_mail_send=True) .exclude(survey_mail_send=True)\
.exclude(mail_state = 'END')
self.surveymails_to_object(supported, type='HON', name='project') self.surveymails_to_object(supported, type='HON', name='project')
def surveymails_to_ifg(self): def surveymails_to_ifg(self):
@ -237,7 +263,8 @@ class Command(BaseCommand):
supported = IFG.objects.filter(granted=True)\ supported = IFG.objects.filter(granted=True)\
.filter(granted_date__lt = date.today() - timedelta(days=14))\ .filter(granted_date__lt = date.today() - timedelta(days=14))\
.exclude(survey_mail_send=True) .exclude(survey_mail_send=True)\
.exclude(mail_state = 'END')
self.surveymails_to_object(supported, type='IFG', name='url') self.surveymails_to_object(supported, type='IFG', name='url')
def surveymails_to_lit(self): def surveymails_to_lit(self):
@ -245,14 +272,16 @@ class Command(BaseCommand):
supported = Literature.objects.filter(granted=True)\ supported = Literature.objects.filter(granted=True)\
.filter(granted_date__lt = date.today() - timedelta(days=14))\ .filter(granted_date__lt = date.today() - timedelta(days=14))\
.exclude(survey_mail_send=True) .exclude(survey_mail_send=True)\
.exclude(mail_state = 'END')
self.surveymails_to_object(supported, type='LIT', name='info') self.surveymails_to_object(supported, type='LIT', name='info')
def surveymails_to_project(self): def surveymails_to_project(self):
'''send survey link 4 weeks after end of project reached''' '''send survey link 4 weeks after end of project reached'''
supported = Project.objects.filter(granted=True)\ supported = Project.objects.filter(granted=True)\
.filter(end__lt = date.today() - timedelta(days=28))\ .filter(end__lt = date.today() - timedelta(days=28))\
.exclude(survey_mail_send=True) .exclude(survey_mail_send=True)\
.exclude(mail_state = 'END')
self.surveymails_to_object(supported, type='PRO', name='name') self.surveymails_to_object(supported, type='PRO', name='name')
def surveymails_to_travel(self): def surveymails_to_travel(self):
@ -260,7 +289,8 @@ class Command(BaseCommand):
supported = Travel.objects.filter(project__granted=True)\ supported = Travel.objects.filter(project__granted=True)\
.filter(project__end__lt = date.today() - timedelta(days=21))\ .filter(project__end__lt = date.today() - timedelta(days=21))\
.exclude(survey_mail_send=True) .exclude(survey_mail_send=True)\
.exclude(mail_state = 'END')
self.surveymails_to_object(supported, type='TRAV', name='project') self.surveymails_to_object(supported, type='TRAV', name='project')
def surveymails_to_mail_vis_lis(self): def surveymails_to_mail_vis_lis(self):
@ -273,7 +303,8 @@ class Command(BaseCommand):
# get class via string # get class via string
supported = getattr(sys.modules[__name__], c).objects.filter(granted=True)\ supported = getattr(sys.modules[__name__], c).objects.filter(granted=True)\
.filter(granted_date__lt = lastdate)\ .filter(granted_date__lt = lastdate)\
.exclude(survey_mail_send=True) .exclude(survey_mail_send=True)\
.exclude(mail_state = 'END')
self.surveymails_to_object(supported, type=typefield[count]) self.surveymails_to_object(supported, type=typefield[count])
count += 1 count += 1

0
input/migrations/0001_initial.py Normal file → Executable file
View file

0
input/migrations/0002_auto_20200922_1340.py Normal file → Executable file
View file

0
input/migrations/0003_volonteer.py Normal file → Executable file
View file

0
input/migrations/0004_project_contact.py Normal file → Executable file
View file

0
input/migrations/0005_auto_20200930_1015.py Normal file → Executable file
View file

0
input/migrations/0006_honorarycertificate.py Normal file → Executable file
View file

0
input/migrations/0007_library.py Normal file → Executable file
View file

0
input/migrations/0008_ifg.py Normal file → Executable file
View file

0
input/migrations/0009_project_pid.py Normal file → Executable file
View file

0
input/migrations/0010_auto_20201007_0732.py Normal file → Executable file
View file

0
input/migrations/0011_auto_20201007_0743.py Normal file → Executable file
View file

0
input/migrations/0012_auto_20201007_0754.py Normal file → Executable file
View file

0
input/migrations/0013_library_type.py Normal file → Executable file
View file

0
input/migrations/0014_auto_20201020_0714.py Normal file → Executable file
View file

0
input/migrations/0015_auto_20201021_0721.py Normal file → Executable file
View file

0
input/migrations/0016_project_account.py Normal file → Executable file
View file

0
input/migrations/0017_auto_20201021_1145.py Normal file → Executable file
View file

0
input/migrations/0018_auto_20201021_1147.py Normal file → Executable file
View file

0
input/migrations/0019_auto_20201021_1148.py Normal file → Executable file
View file

0
input/migrations/0020_project_project_end_mail.py Normal file → Executable file
View file

0
input/migrations/0021_auto_20201022_0934.py Normal file → Executable file
View file

0
input/migrations/0022_auto_20201022_1233.py Normal file → Executable file
View file

0
input/migrations/0023_auto_20201022_1400.py Normal file → Executable file
View file

0
input/migrations/0024_travel.py Normal file → Executable file
View file

0
input/migrations/0025_auto_20201026_1048.py Normal file → Executable file
View file

0
input/migrations/0026_auto_20201026_1214.py Normal file → Executable file
View file

0
input/migrations/0027_businesscard_email_list.py Normal file → Executable file
View file

0
input/migrations/0028_auto_20201027_1131.py Normal file → Executable file
View file

0
input/migrations/0029_auto_20201027_1247.py Normal file → Executable file
View file

0
input/migrations/0030_auto_20201027_1337.py Normal file → Executable file
View file

0
input/migrations/0031_auto_20201028_1402.py Normal file → Executable file
View file

0
input/migrations/0032_auto_20201029_1213.py Normal file → Executable file
View file

0
input/migrations/0033_auto_20201029_1338.py Normal file → Executable file
View file

0
input/migrations/0034_auto_20201102_0913.py Normal file → Executable file
View file

0
input/migrations/0035_auto_20201102_0944.py Normal file → Executable file
View file

0
input/migrations/0036_auto_20201102_1049.py Normal file → Executable file
View file

0
input/migrations/0037_auto_20201102_1054.py Normal file → Executable file
View file

0
input/migrations/0038_auto_20201102_1055.py Normal file → Executable file
View file

0
input/migrations/0039_auto_20201102_1212.py Normal file → Executable file
View file

0
input/migrations/0040_auto_20201102_1302.py Normal file → Executable file
View file

0
input/migrations/0041_auto_20201102_1318.py Normal file → Executable file
View file

0
input/migrations/0042_auto_20201102_1319.py Normal file → Executable file
View file

0
input/migrations/0043_auto_20201102_1320.py Normal file → Executable file
View file

0
input/migrations/0044_auto_20201103_1545.py Normal file → Executable file
View file

0
input/migrations/0044_auto_20201116_1531.py Normal file → Executable file
View file

0
input/migrations/0045_auto_20201116_1557.py Normal file → Executable file
View file

0
input/migrations/0046_auto_20201117_1542.py Normal file → Executable file
View file

0
input/migrations/0047_auto_20201117_1546.py Normal file → Executable file
View file

0
input/migrations/0048_auto_20201118_1503.py Normal file → Executable file
View file

0
input/migrations/0049_auto_20201118_1509.py Normal file → Executable file
View file

0
input/migrations/0050_auto_20201118_1512.py Normal file → Executable file
View file

0
input/migrations/0051_auto_20201118_1521.py Normal file → Executable file
View file

0
input/migrations/0052_auto_20201118_1524.py Normal file → Executable file
View file

0
input/migrations/0053_auto_20201118_1531.py Normal file → Executable file
View file

0
input/migrations/0054_auto_20201118_1702.py Normal file → Executable file
View file

0
input/migrations/0055_merge_20201118_1734.py Normal file → Executable file
View file

0
input/migrations/0056_auto_20201217_1215.py Normal file → Executable file
View file

0
input/migrations/0057_auto_20210104_0937.py Normal file → Executable file
View file

0
input/migrations/0058_auto_20210412_0946.py Normal file → Executable file
View file

0
input/migrations/0059_auto_20210412_1142.py Normal file → Executable file
View file

0
input/migrations/0060_concreteextern.py Normal file → Executable file
View file

0
input/migrations/0061_concretevolunteer.py Normal file → Executable file
View file

0
input/migrations/0062_auto_20211103_1155.py Normal file → Executable file
View file

View file

0
input/migrations/0066_email_adult.py Normal file → Executable file
View file

View file

0
input/migrations/0068_travel_hotel.py Normal file → Executable file
View file

0
input/migrations/0069_alter_travel_transport.py Normal file → Executable file
View file

0
input/migrations/0070_alter_travel_project.py Normal file → Executable file
View file

0
input/migrations/0073_account_intern_notes.py Normal file → Executable file
View file

0
input/migrations/0074_project_intern_notes.py Normal file → Executable file
View file

0
input/migrations/0075_literature_selfbuy_data.py Normal file → Executable file
View file

View file

@ -0,0 +1,78 @@
# Generated by Django 3.1.2 on 2022-11-29 16:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0075_literature_selfbuy_data'),
]
operations = [
migrations.AlterField(
model_name='businesscard',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='concreteextern',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='concretevolunteer',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='email',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='honorarycertificate',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='ifg',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='library',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='list',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='literature',
name='selfbuy_data',
field=models.TextField(default='', help_text='Bitte gib hier alle persönlichen Daten an, die wir benötigen, um das Werk<br> für dich zu kaufen und es dir anschließend zu schicken (z.B. Vorname Nachname, Anschrift, <br> Telefonnummer, E-Mail-Adresse usw.). Trenne die einzelnen Angaben durch Zeilenumbrüche. <br> Hinweis: Telefonnummern bilden wir üblicherweise im internationalen Format gemäß<br> DIN 5008 ab. Als anzugebende E-Mail-Adresse empfehlen wir dir eine Wikimedia-Projekt-<br> Adresse, die du ebenfalls beantragen kannst, sofern du nicht bereits eine besitzt.', max_length=1000, verbose_name='Persönliche Daten sowie Adresse'),
),
migrations.AlterField(
model_name='literature',
name='selfbuy_give_data',
field=models.BooleanField(help_text='Weitergabe meiner Daten (Name, Postadresse) an den von mir angegebenen Anbieter/Dienstleister.', verbose_name='Datenweitergabe erlauben'),
),
migrations.AlterField(
model_name='literature',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='project',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='travel',
name='survey_mail_send',
field=models.BooleanField(default=True, verbose_name='Keine Umfragemail schicken'),
),
]

View file

@ -0,0 +1,123 @@
# Generated by Django 3.1.2 on 2022-11-29 17:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0076_auto_20221129_1601'),
]
operations = [
migrations.AddField(
model_name='businesscard',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='concreteextern',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='concretevolunteer',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='email',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='honorarycertificate',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='ifg',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='library',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='list',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='literature',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='project',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AddField(
model_name='travel',
name='mailState',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('SURVEY', 'die Survey Mail wurde bereits versendet'), ('END', 'alle automatischen Mails wurden bereits versendet')], default='END', max_length=6),
),
migrations.AlterField(
model_name='businesscard',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='concreteextern',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='concretevolunteer',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='email',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='honorarycertificate',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='ifg',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='library',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='list',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='literature',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='project',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
migrations.AlterField(
model_name='travel',
name='survey_mail_send',
field=models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken'),
),
]

View file

@ -0,0 +1,68 @@
# Generated by Django 3.1.2 on 2022-11-29 17:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('input', '0077_auto_20221129_1706'),
]
operations = [
migrations.RenameField(
model_name='businesscard',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='concreteextern',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='concretevolunteer',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='email',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='honorarycertificate',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='ifg',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='library',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='list',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='literature',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='project',
old_name='mailState',
new_name='mail_state',
),
migrations.RenameField(
model_name='travel',
old_name='mailState',
new_name='mail_state',
),
]

View file

@ -0,0 +1,68 @@
# Generated by Django 3.1.2 on 2022-11-29 23:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0078_auto_20221129_1712'),
]
operations = [
migrations.AlterField(
model_name='businesscard',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='concreteextern',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='concretevolunteer',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='email',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='honorarycertificate',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='ifg',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='library',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='list',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='literature',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='project',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
migrations.AlterField(
model_name='travel',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('END', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('APPR', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='APPR', max_length=6),
),
]

View file

@ -0,0 +1,68 @@
# Generated by Django 3.1.2 on 2022-11-29 23:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0079_auto_20221129_2310'),
]
operations = [
migrations.AlterField(
model_name='businesscard',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='concreteextern',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='concretevolunteer',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='email',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='honorarycertificate',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='ifg',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='library',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='list',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='literature',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='project',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
migrations.AlterField(
model_name='travel',
name='mail_state',
field=models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung End-Mail wurde bereits versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden bereits versendet')], default='NONE', max_length=6),
),
]

0
input/migrations/__init__.py Normal file → Executable file
View file

Some files were not shown because too many files have changed in this diff Show more