forked from beba/foerderbarometer
Add 'Antrag (URL)' request_url field to service models via RequestUrlMixin
This commit is contained in:
parent
38f6deee51
commit
0db5cb7fd9
|
|
@ -19,6 +19,19 @@ class TermsConsentMixin(models.Model):
|
||||||
abstract = True
|
abstract = True
|
||||||
|
|
||||||
|
|
||||||
|
class RequestUrlMixin(models.Model):
|
||||||
|
"""
|
||||||
|
Abstract mixin for adding an OTRS request URL field to admin models.
|
||||||
|
|
||||||
|
This field stores a direct link to the related OTRS ticket.
|
||||||
|
Note: OTRS links may contain semicolons, which must not be URL-encoded.
|
||||||
|
"""
|
||||||
|
request_url = models.URLField(max_length=2000, null=True, verbose_name='Antrag (URL)')
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
abstract = True
|
||||||
|
|
||||||
|
|
||||||
class Volunteer(models.Model):
|
class Volunteer(models.Model):
|
||||||
realname = models.CharField(max_length=200, null=True, verbose_name="Realname",
|
realname = models.CharField(max_length=200, null=True, verbose_name="Realname",
|
||||||
help_text="Bitte gib deinen Vornamen und deinen Nachnamen ein.", default='')
|
help_text="Bitte gib deinen Vornamen und deinen Nachnamen ein.", default='')
|
||||||
|
|
@ -244,7 +257,7 @@ def getProjectEnd(sender, instance, **kwargs):
|
||||||
# super(Travel, self).save(*args,**kwargs)
|
# super(Travel, self).save(*args,**kwargs)
|
||||||
|
|
||||||
#abstract base class for Library and IFG
|
#abstract base class for Library and IFG
|
||||||
class Grant(Extern):
|
class Grant(RequestUrlMixin, Extern):
|
||||||
cost = models.CharField(max_length=10, verbose_name='Kosten',
|
cost = models.CharField(max_length=10, verbose_name='Kosten',
|
||||||
help_text="Bitte gib die ungefähr zu erwartenden Kosten in Euro an.")
|
help_text="Bitte gib die ungefähr zu erwartenden Kosten in Euro an.")
|
||||||
notes = models.TextField(max_length=1000, blank=True, verbose_name='Anmerkungen',
|
notes = models.TextField(max_length=1000, blank=True, verbose_name='Anmerkungen',
|
||||||
|
|
@ -361,7 +374,7 @@ DOMAIN_CHOICES = {'PEDIA': '@wikipedia.de',
|
||||||
'SOURCE': '@wikisource.de',
|
'SOURCE': '@wikisource.de',
|
||||||
'VERSITY': '@wikiversity.de',}
|
'VERSITY': '@wikiversity.de',}
|
||||||
|
|
||||||
class Domain(Extern):
|
class Domain(RequestUrlMixin, Extern):
|
||||||
domain = models.CharField(max_length=10,
|
domain = models.CharField(max_length=10,
|
||||||
choices=DOMAIN_CHOICES.items(),
|
choices=DOMAIN_CHOICES.items(),
|
||||||
default='PEDIA')
|
default='PEDIA')
|
||||||
|
|
@ -406,7 +419,7 @@ PROJECT_CHOICE = {'PEDIA': 'Wikipedia',
|
||||||
BC_VARIANT = {'PIC': 'mit Bild',
|
BC_VARIANT = {'PIC': 'mit Bild',
|
||||||
'NOPIC': 'ohne Bild'}
|
'NOPIC': 'ohne Bild'}
|
||||||
|
|
||||||
class BusinessCard(TermsConsentMixin, Extern):
|
class BusinessCard(RequestUrlMixin, TermsConsentMixin, Extern):
|
||||||
project = models.CharField(max_length=20, choices=PROJECT_CHOICE.items(),
|
project = models.CharField(max_length=20, choices=PROJECT_CHOICE.items(),
|
||||||
default='PEDIA', verbose_name='Wikimedia-Projekt',
|
default='PEDIA', verbose_name='Wikimedia-Projekt',
|
||||||
help_text='Für welches Wikimedia-Projekt möchtest Du Visitenkarten?')
|
help_text='Für welches Wikimedia-Projekt möchtest Du Visitenkarten?')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue