chol
/
eva
forked from tohe/eva
1
0
Fork 0

added field "intern/extern"

This commit is contained in:
Benni Bärmann 2021-02-08 12:19:54 +01:00
parent ae051b2b48
commit 70b849ffd6
3 changed files with 20 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class PersonalForm(EvaForm):
class Meta: class Meta:
model = Employee model = Employee
fields = ['firstname', 'lastname', 'email', 'department', 'team', ] fields = ['firstname', 'lastname', 'intern', 'email', 'department', 'team', ]
class WorkingForm(EvaForm): class WorkingForm(EvaForm):
class Meta: class Meta:

View File

@ -0,0 +1,18 @@
# Generated by Django 3.1.4 on 2021-02-08 11:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('evapp', '0003_auto_20210114_1357'),
]
operations = [
migrations.AddField(
model_name='employee',
name='intern',
field=models.BooleanField(default=True, verbose_name='Interne_r Mitarbeiter_in?'),
),
]

View File

@ -42,6 +42,7 @@ class Employee(models.Model):
# personal data # personal data
firstname = models.CharField(max_length=50, verbose_name="Vorname") firstname = models.CharField(max_length=50, verbose_name="Vorname")
lastname = models.CharField(max_length=50, verbose_name="Nachname") lastname = models.CharField(max_length=50, verbose_name="Nachname")
intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True)
email = models.CharField(max_length=50, verbose_name="E-Mail-Adresse") email = models.CharField(max_length=50, verbose_name="E-Mail-Adresse")
department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items()) department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items())
team = models.CharField(max_length=20, null=True, blank=True) team = models.CharField(max_length=20, null=True, blank=True)