forked from beba/foerderbarometer
intern view now works with django 3.2, too
This commit is contained in:
parent
586a30d8e9
commit
a23ffdf67f
|
@ -3,7 +3,7 @@ from django.forms import ModelForm, DateField, ChoiceField, RadioSelect, Boolean
|
|||
from django.contrib.admin.widgets import AdminDateWidget
|
||||
from django.utils.html import format_html
|
||||
|
||||
from .models import Project, Volunteer, Extern, ConcreteExtern, IFG, Library, TYPE_CHOICES,\
|
||||
from .models import Project, Volunteer, ConcreteVolunteer, Extern, ConcreteExtern, IFG, Library, TYPE_CHOICES,\
|
||||
HonoraryCertificate, Travel, Email, Literature, List,\
|
||||
BusinessCard
|
||||
from .settings import DATAPROTECTION, FOERDERRICHTLINIEN, NUTZUNGSBEDINGUNGEN
|
||||
|
@ -48,7 +48,7 @@ class InternForm(FdbForm):
|
|||
label = 'Was möchtest Du eingeben?')
|
||||
|
||||
class Meta:
|
||||
model = Volunteer
|
||||
model = ConcreteVolunteer
|
||||
exclude = ('granted', 'granted_date', 'survey_mail_send', 'survey_mail_date')
|
||||
|
||||
class TravelForm(FdbForm):
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
# Generated by Django 3.2.5 on 2021-07-07 07:42
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('input', '0060_concreteextern'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ConcreteVolunteer',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('realname', models.CharField(help_text='Bitte gib deinen Vornamen und deinen Nachnamen ein.', max_length=200, null=True, verbose_name='Realname')),
|
||||
('email', models.EmailField(help_text='Bitte gib deine E-Mail-Adresse ein, damit dich<br>Wikimedia Deutschland bei Rückfragen oder für<br>die Zusage kontaktieren kann.', max_length=200, null=True, verbose_name='E-Mail-Adresse')),
|
||||
('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(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
]
|
|
@ -96,6 +96,10 @@ class Intern(Volunteer):
|
|||
class Meta:
|
||||
abstract = True
|
||||
|
||||
class ConcreteVolunteer(Volunteer):
|
||||
''' needed because we can't initiate abstract base classes in the view'''
|
||||
pass
|
||||
|
||||
class HonoraryCertificate(Intern):
|
||||
''' this class is also used for accreditations '''
|
||||
|
||||
|
|
Loading…
Reference in New Issue