added Accounts to project form
This commit is contained in:
parent
6f87ea69cc
commit
d35775b1c4
3 changed files with 22 additions and 2 deletions
|
@ -5,7 +5,7 @@ from django.core.management.base import BaseCommand, CommandError
|
||||||
# - two weeks after confirmation of support for volunteer (/extern) send link
|
# - two weeks after confirmation of support for volunteer (/extern) send link
|
||||||
# with surveylink
|
# with surveylink
|
||||||
#
|
#
|
||||||
# - same for HonoraryCertificate and accreditation
|
# - same for HonoraryCertificate and accreditation (/intern)
|
||||||
#
|
#
|
||||||
# - travel: mail 3 weeks after end of project.
|
# - travel: mail 3 weeks after end of project.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
from .settings import ACCOUNTS
|
||||||
|
|
||||||
class Volunteer(models.Model):
|
class Volunteer(models.Model):
|
||||||
realname = models.CharField(max_length=200, null=True)
|
realname = models.CharField(max_length=200, null=True)
|
||||||
|
@ -19,6 +20,7 @@ class Volunteer(models.Model):
|
||||||
class Project(Volunteer):
|
class Project(Volunteer):
|
||||||
name = models.CharField(max_length=200)
|
name = models.CharField(max_length=200)
|
||||||
start = models.DateField('start date')
|
start = models.DateField('start date')
|
||||||
|
account = models.CharField(max_length=5, choices=ACCOUNTS.items())
|
||||||
|
|
||||||
pid = models.IntegerField(null=True, blank=True) # automaticly generated
|
pid = models.IntegerField(null=True, blank=True) # automaticly generated
|
||||||
|
|
||||||
|
@ -29,7 +31,7 @@ class Project(Volunteer):
|
||||||
super().save(*args,*kwargs)
|
super().save(*args,*kwargs)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.pid} {self.name}"
|
return f"{self.pid} {self.name}"
|
||||||
|
|
||||||
class HonoraryCertificate(Volunteer):
|
class HonoraryCertificate(Volunteer):
|
||||||
request_url = models.CharField(max_length=2000)
|
request_url = models.CharField(max_length=2000)
|
||||||
|
|
|
@ -8,3 +8,21 @@ URLPREFIX = 'http://127.0.0.1:8000'
|
||||||
DATAPROTECTION = "https://www.wikimedia.de/datenschutz/"
|
DATAPROTECTION = "https://www.wikimedia.de/datenschutz/"
|
||||||
FOERDERRICHTLINIEN = "https://de.wikipedia.org/wiki/Wikipedia:Wikimedia_Deutschland/F%C3%B6rderrichtlinien"
|
FOERDERRICHTLINIEN = "https://de.wikipedia.org/wiki/Wikipedia:Wikimedia_Deutschland/F%C3%B6rderrichtlinien"
|
||||||
NUTZUNGSBEDINGUNGEN = 'TODO'
|
NUTZUNGSBEDINGUNGEN = 'TODO'
|
||||||
|
|
||||||
|
|
||||||
|
ACCOUNTS ={"21103": '21103 Willkommen',
|
||||||
|
"21111": '21111 Förderung',
|
||||||
|
"21112": '21112 WikiCon',
|
||||||
|
"21113": '21113 Wikimania/Unterstützung Ehrenamtliche',
|
||||||
|
"21115": '21115 Lokale Räume, Berlin',
|
||||||
|
"21116": '21116 Lokale Räume, Hamburg',
|
||||||
|
"21117": '21117 Lokale Räume, Hannover',
|
||||||
|
"21118": '21118 Lokale Räume, Köln',
|
||||||
|
"21119": '21119 Lokale Räume, München',
|
||||||
|
"21120": '21120 Lokale Räume, Fürth',
|
||||||
|
"21125": '21125 Lokale Räume, allgemein',
|
||||||
|
"21134": '21134 Größe',
|
||||||
|
"21137": '21137 Beitragen',
|
||||||
|
"21138": '21138 Vermittlung',}
|
||||||
|
|
||||||
|
#ACCOUNTS_LIST = [(k, v) for k, v in ACCOUNTS_DICT.iteritems()]
|
||||||
|
|
Loading…
Reference in a new issue