From e56dbe88ef821b0d0fdb0584a01b13849b123531 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Tue, 17 Nov 2020 10:56:24 +0100 Subject: [PATCH] added links to choices in /extern form --- input/models.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/input/models.py b/input/models.py index 566137a..4c2e1ac 100644 --- a/input/models.py +++ b/input/models.py @@ -1,13 +1,15 @@ from datetime import date from django.db import models +from django.utils.html import format_html from .settings import ACCOUNTS class Volunteer(models.Model): - realname = models.CharField(max_length=200, null=True, verbose_name="Name / Hauptansprechperson") - email = models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse') + realname = models.CharField(max_length=200, null=True, verbose_name="Realname") + email = models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse', + help_text='lala hilfehilfe') # the following Fields are not supposed to be edited by users granted = models.BooleanField(null=True) @@ -124,14 +126,14 @@ class Grant(Extern): abstract = True -TYPE_CHOICES = {'BIB': 'Bibliotheksstipendium', - 'ELIT': 'eLiteraturstipendium', - 'SOFT': 'Softwarestipendium', - 'VIS': 'Visitenkarten', - 'LIST': 'Mailingliste', - 'MAIL': 'E-Mail-Adresse', - 'IFG': 'Kostenübernahme IFG-Anfrage', - 'LIT': 'Literaturstipendium',} +TYPE_CHOICES = {'BIB': format_html('Bibliotheksstipendium'), + 'ELIT': format_html('eLiteraturstipendium'), + 'SOFT': format_html('Softwarestipendium'), + 'VIS': format_html('Visitenkarten'), + 'LIST': format_html('Mailingliste'), + 'MAIL': format_html('E-Mail-Adresse'), + 'IFG': format_html('Kostenübernahme IFG-Anfrage'), + 'LIT': format_html('Literaturstipendium'),} # same model is used for Library, ELitStip and Software!