@ -144,14 +144,17 @@ PAYEDBY_CHOICES = {'WMDE': 'WMDE',
' REQU ' : ' Antragstellender Mensch ' }
' REQU ' : ' Antragstellender Mensch ' }
class Travel ( Intern ) :
class Travel ( Intern ) :
project = models . ForeignKey ( Project , on_delete = models . CASCADE )
transport = models . CharField ( max_length = 5 , choices = TRANSPORT_CHOICES . items ( ) , default = ' BAHN ' )
# project variable is now null true and blank true, which means it can be saved without project id to be later on filled out by admins
project = models . ForeignKey ( Project , on_delete = models . CASCADE , null = True , blank = True )
project_name = models . CharField ( max_length = 50 , null = True , blank = True , verbose_name = ' Projektname: ' )
transport = models . CharField ( max_length = 5 , choices = TRANSPORT_CHOICES . items ( ) , default = ' BAHN ' , verbose_name = ' Transportmittel: ' )
other_transport = models . CharField ( max_length = 200 , null = True , blank = True , verbose_name = ' Sonstige Transportmittel (mit Begründung) ' )
other_transport = models . CharField ( max_length = 200 , null = True , blank = True , verbose_name = ' Sonstige Transportmittel (mit Begründung) ' )
travelcost = models . CharField ( max_length = 10 , default = " 0 " , verbose_name = " Fahrtkosten " )
travelcost = models . CharField ( max_length = 10 , default = " 0 " , verbose_name = " Fahrtkosten " )
checkin = models . DateField ( blank = True , null = True , verbose_name = ' Check In ' )
checkin = models . DateField ( blank = True , null = True , verbose_name = ' Check In ' )
checkout = models . DateField ( blank = True , null = True , verbose_name = ' Check Out ' )
checkout = models . DateField ( blank = True , null = True , verbose_name = ' Check Out ' )
payed_for_hotel_by = models . CharField ( max_length = 4 , choices = PAYEDBY_CHOICES . items ( ) , blank = True , null = True , verbose_name = ' Kostenauslage Hotel durch ' )
payed_for_hotel_by = models . CharField ( max_length = 4 , choices = PAYEDBY_CHOICES . items ( ) , blank = True , null = True , verbose_name = ' Kostenauslage Hotel durch ' )
payed_for_travel_by = models . CharField ( max_length = 4 , choices = PAYEDBY_CHOICES . items ( ) , blank = True , null = True , verbose_name = ' Kostenauslage Fahrt durch ' )
payed_for_travel_by = models . CharField ( max_length = 4 , choices = PAYEDBY_CHOICES . items ( ) , blank = True , null = True , verbose_name = ' Kostenauslage Fahrt durch ' )
hotel = models . BooleanField ( default = False , verbose_name = ' Hotelzimmer benötigt: ' )
notes = models . TextField ( max_length = 1000 , blank = True )
notes = models . TextField ( max_length = 1000 , blank = True )
@ -174,6 +177,7 @@ TYPE_CHOICES = {'BIB': format_html('
' LIST ' : format_html ( ' <a href= " https://de.wikipedia.org/wiki/Wikipedia:Förderung/E-Mail-Adressen_und_Visitenkarten#Mailinglisten " target= " _blank " rel= " noopener " >Mailingliste</a> ' ) ,
' LIST ' : format_html ( ' <a href= " https://de.wikipedia.org/wiki/Wikipedia:Förderung/E-Mail-Adressen_und_Visitenkarten#Mailinglisten " target= " _blank " rel= " noopener " >Mailingliste</a> ' ) ,
' SOFT ' : format_html ( ' <a href= " https://de.wikipedia.org/wiki/Wikipedia:Förderung/Software-Stipendien " target= " _blank " rel= " noopener " >Softwarestipendium</a> ' ) ,
' SOFT ' : format_html ( ' <a href= " https://de.wikipedia.org/wiki/Wikipedia:Förderung/Software-Stipendien " target= " _blank " rel= " noopener " >Softwarestipendium</a> ' ) ,
' VIS ' : format_html ( ' <a href= " https://de.wikipedia.org/wiki/Wikipedia:Förderung/E-Mail-Adressen_und_Visitenkarten#Visitenkarten " target= " _blank " rel= " noopener " >Visitenkarten</a> ' ) ,
' VIS ' : format_html ( ' <a href= " https://de.wikipedia.org/wiki/Wikipedia:Förderung/E-Mail-Adressen_und_Visitenkarten#Visitenkarten " target= " _blank " rel= " noopener " >Visitenkarten</a> ' ) ,
' TRAV ' : format_html ( ' Reisekosten ' ) ,
}
}
# same model is used for Library, ELitStip and Software!
# same model is used for Library, ELitStip and Software!
@ -232,6 +236,11 @@ MAIL_CHOICES = {'REALNAME': 'Vorname.Nachname',
' USERNAME ' : ' Username ' ,
' USERNAME ' : ' Username ' ,
' OTHER ' : ' Sonstiges: ' }
' OTHER ' : ' Sonstiges: ' }
ADULT_CHOICES = { ' TRUE ' : format_html ( ' Ich bin volljährig. ' ) ,
' FALSE ' : format_html ( ' Ich bin noch nicht volljährig. ' ) ,
' NONE ' : format_html ( ' Nichts ausgewählt ' )
}
class Email ( Domain ) :
class Email ( Domain ) :
address = models . CharField ( max_length = 50 ,
address = models . CharField ( max_length = 50 ,
choices = MAIL_CHOICES . items ( ) ,
choices = MAIL_CHOICES . items ( ) ,
@ -239,6 +248,7 @@ class Email(Domain):
help_text = format_html ( " Bitte gib hier den gewünschten Adressbestandteil an,<br>der sich vor der Domain befinden soll. " ) )
help_text = format_html ( " Bitte gib hier den gewünschten Adressbestandteil an,<br>der sich vor der Domain befinden soll. " ) )
other = models . CharField ( max_length = 50 , blank = True , null = True , verbose_name = " Sonstiges " )
other = models . CharField ( max_length = 50 , blank = True , null = True , verbose_name = " Sonstiges " )
adult = models . CharField ( max_length = 10 , verbose_name = ' Volljährigkeit ' , choices = ADULT_CHOICES . items ( ) , default = ' NONE ' )
class List ( Domain ) :
class List ( Domain ) :
address = models . CharField ( max_length = 50 , default = ' NO_ADDRESS ' ,
address = models . CharField ( max_length = 50 , default = ' NO_ADDRESS ' ,