IT-part of the modell added

This commit is contained in:
Benni Bärmann 2020-12-23 13:16:01 +01:00
parent 03acbe7ee7
commit 23d20bacc7
5 changed files with 53 additions and 40 deletions

View File

@ -12,7 +12,7 @@ environment managing tool
- use this environment and do
pip install django
pip install django django-multiselectfield
- clone this repository

View File

@ -38,6 +38,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'multiselectfield',
]
MIDDLEWARE = [

View File

@ -1,6 +1,7 @@
# Generated by Django 3.1.4 on 2020-12-23 11:03
# Generated by Django 3.1.4 on 2020-12-23 12:14
from django.db import migrations, models
import multiselectfield.db.fields
class Migration(migrations.Migration):
@ -20,6 +21,20 @@ class Migration(migrations.Migration):
('email', models.CharField(max_length=50, verbose_name='E-Mail-Adresse')),
('department', models.CharField(choices=[('PROG', 'Programme'), ('SOFT', 'Softwareentwicklung'), ('CENT', 'Central'), ('VOR', 'Vorstand')], max_length=5)),
('team', models.CharField(blank=True, max_length=20, null=True)),
('firstdate_employment', models.DateField(null=True, verbose_name='erster Arbeitstag')),
('firstdate_presence', models.DateField(null=True, verbose_name='erster Tag der Anwesenheit in der Geschäftsstelle')),
('jobdescription_german', models.CharField(max_length=100, null=True, verbose_name='Stellenbeschreibung(deutsch)')),
('jobdescription_english', models.CharField(max_length=100, null=True, verbose_name='job description(english)')),
('desk', models.CharField(max_length=100, null=True, verbose_name='Wo soll der Arbeitsplatz sein?')),
('laptop', models.CharField(choices=[('14', '14", unser Standardgerät'), ('12', '12,5", geeignet für Vielreisende')], default='14', max_length=2)),
('os', models.CharField(choices=[('UBU', 'Ubuntu (Standard)'), ('WIN', 'Windows (bitte Begründung angeben)')], default='UBU', max_length=3)),
('screen', models.BooleanField(default=False, verbose_name='zusätzlicher Monitor? Einer ist standard.')),
('mobile', models.CharField(default='NO', max_length=6)),
('landline', models.BooleanField(default=True, verbose_name='Festnetztelefon')),
('comment', models.TextField(blank=True, max_length=500, null=True, verbose_name='zusätzliche IT-Anforderungen')),
('language', models.CharField(choices=[('GER', 'deutsch'), ('ENG', 'english')], default='GER', max_length=3)),
('accounts', multiselectfield.db.fields.MultiSelectField(choices=[('OTRSWMDE', 'OTRS (WMDE)'), ('OTRSFUND', 'OTRS (Fundraising)'), ('CIVIC1', 'Civic CRM (allgemein)'), ('CIVIC2', 'Civic CRM (Mailings, impliziert allgemein)'), ('FUND', 'Fundraising Netzlaufwerk'), ('WEB', 'www.wikimedia.de (edit)'), ('BLOG', 'blog.wikimedia.de (edit)'), ('FORUM', 'forum.wikimedia.de')], max_length=51, null=True)),
('lists', models.CharField(max_length=100, null=True)),
],
),
]

View File

@ -1,38 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-23 11:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('evapp', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='employee',
name='desk',
field=models.CharField(max_length=100, null=True, verbose_name='Wo soll der Arbeitsplatz sein?'),
),
migrations.AddField(
model_name='employee',
name='firstdate_employment',
field=models.DateField(null=True, verbose_name='erster Arbeitstag'),
),
migrations.AddField(
model_name='employee',
name='firstdate_presence',
field=models.DateField(null=True, verbose_name='erster Tag der Anwesenheit in der Geschäftsstelle'),
),
migrations.AddField(
model_name='employee',
name='jobdescription_english',
field=models.CharField(max_length=100, null=True, verbose_name='job description(english)'),
),
migrations.AddField(
model_name='employee',
name='jobdescription_german',
field=models.CharField(max_length=100, null=True, verbose_name='Stellenbeschreibung(deutsch)'),
),
]

View File

@ -1,10 +1,35 @@
from django.db import models
from multiselectfield import MultiSelectField
DEPARTMENT_CHOICES = {'PROG': 'Programme',
'SOFT': 'Softwareentwicklung',
'CENT': 'Central',
'VOR': 'Vorstand',}
LAPTOP_CHOICES = {'14': '14", unser Standardgerät',
'12': '12,5", geeignet für Vielreisende',}
OS_CHOICES = {'UBU': 'Ubuntu (Standard)',
'WIN': 'Windows (bitte Begründung angeben)',}
MOBILE_CHOICES = {'NO': 'Kein Mobiltelefon',
'SIMPLE': 'Einfaches Gerät für Erreichbarkeit',
'SINGLE': 'Smartphone, Single SIM',
'DUAL': 'Smartphone, Dual SIM',}
LANG_CHOICES = {'GER': 'deutsch',
'ENG': 'english',}
ACCOUNT_CHOICES = {'OTRSWMDE': 'OTRS (WMDE)',
'OTRSFUND': 'OTRS (Fundraising)',
'CIVIC1': 'Civic CRM (allgemein)',
'CIVIC2': "Civic CRM (Mailings, impliziert allgemein)",
'FUND': "Fundraising Netzlaufwerk",
'WEB': 'www.wikimedia.de (edit)',
'BLOG': 'blog.wikimedia.de (edit)',
'FORUM': 'forum.wikimedia.de',
}
class Employee(models.Model):
firstname = models.CharField(max_length=50, verbose_name="Vorname")
lastname = models.CharField(max_length=50, verbose_name="Nachname")
@ -18,3 +43,13 @@ class Employee(models.Model):
jobdescription_english = models.CharField(null=True, max_length=100, verbose_name="job description(english)")
desk = models.CharField(max_length=100, null=True, verbose_name="Wo soll der Arbeitsplatz sein?")
# TODO: we need an optional question for remote work here
laptop = models.CharField(max_length=2, choices=LAPTOP_CHOICES.items(), default='14')
os = models.CharField(max_length=3, choices=OS_CHOICES.items(), default='UBU')
screen = models.BooleanField(default=False, verbose_name='zusätzlicher Monitor? Einer ist standard.')
mobile = models.CharField(max_length=6, default='NO')
landline = models.BooleanField(default=True, verbose_name="Festnetztelefon")
comment = models.TextField(max_length=500, null=True, blank=True, verbose_name="zusätzliche IT-Anforderungen")
language = models.CharField(max_length=3, choices=LANG_CHOICES.items(), default="GER")
accounts = MultiSelectField(choices=ACCOUNT_CHOICES.items(), null=True)
lists = models.CharField(max_length=100, null=True)