1
0
Fork 0

added intern_notes variable to all dbs, not excluded in extern view for all

This commit is contained in:
corsaronero 2022-11-17 18:19:18 +00:00
parent c3c5a44be5
commit 5d436f9294
5 changed files with 96 additions and 6 deletions

View File

@ -58,7 +58,7 @@ class TravelForm(FdbForm):
# TODO: add some javascript to show/hide other-field # TODO: add some javascript to show/hide other-field
class Meta: class Meta:
model = Travel model = Travel
exclude = ('granted', 'granted_date', 'survey_mail_send', 'realname', 'email', 'survey_mail_date', 'project', 'request_url', 'payed_for_hotel_by', 'payed_for_travel_by' ) exclude = ('granted', 'granted_date', 'survey_mail_send', 'realname', 'email', 'survey_mail_date', 'project', 'request_url', 'payed_for_hotel_by', 'payed_for_travel_by', 'intern_notes' )
widgets = {'checkin': AdminDateWidget(), widgets = {'checkin': AdminDateWidget(),
'checkout': AdminDateWidget(),} 'checkout': AdminDateWidget(),}
@ -67,16 +67,19 @@ class LibraryForm(FdbForm):
class Meta: class Meta:
model = Library model = Library
fields = ['cost', 'library', 'duration', 'notes'] fields = ['cost', 'library', 'duration', 'notes']
exclude = ['intern_notes']
class HonoraryCertificateForm(FdbForm): class HonoraryCertificateForm(FdbForm):
class Meta: class Meta:
model = HonoraryCertificate model = HonoraryCertificate
fields = ['request_url', 'project'] fields = ['request_url', 'project']
exclude = ['intern_notes']
class IFGForm(FdbForm): class IFGForm(FdbForm):
class Meta: class Meta:
model = IFG model = IFG
fields = ['cost', 'url', 'notes'] fields = ['cost', 'url', 'notes']
exclude = ['intern_notes']
class CheckForm(FdbForm): class CheckForm(FdbForm):
@ -93,6 +96,7 @@ class LiteratureForm(CheckForm):
class Meta: class Meta:
model = Literature model = Literature
fields = ['cost', 'info', 'source', 'notes', 'selfbuy', 'selfbuy_give_data'] fields = ['cost', 'info', 'source', 'notes', 'selfbuy', 'selfbuy_give_data']
exclude = ['intern_notes']
class Media: class Media:
js = ('dropdown/js/base.js',) js = ('dropdown/js/base.js',)
@ -108,6 +112,7 @@ class EmailForm(CheckForm):
class Meta: class Meta:
model = Email model = Email
fields = ['domain', 'address', 'other', 'adult'] fields = ['domain', 'address', 'other', 'adult']
exclude = ['intern_notes']
class Media: class Media:
js = ('dropdown/js/base.js',) js = ('dropdown/js/base.js',)
@ -121,7 +126,7 @@ class BusinessCardForm(CheckForm):
class Meta: class Meta:
model = BusinessCard model = BusinessCard
exclude = ['intern_notes']
fields = ['project', 'data', 'variant', 'url_of_pic', 'sent_to'] fields = ['project', 'data', 'variant', 'url_of_pic', 'sent_to']
class Media: class Media:
js = ('dropdown/js/base.js',) js = ('dropdown/js/base.js',)
@ -131,4 +136,5 @@ class ListForm(CheckForm):
class Meta: class Meta:
model = List model = List
fields = ['domain', 'address'] fields = ['domain', 'address']
exclude = ['intern_notes']

View File

@ -0,0 +1,43 @@
# Generated by Django 4.1.2 on 2022-11-17 18:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0071_honorarycertificate_intern_notes_travel_intern_notes'),
]
operations = [
migrations.AddField(
model_name='businesscard',
name='intern_notes',
field=models.TextField(blank=True, max_length=1000),
),
migrations.AddField(
model_name='email',
name='intern_notes',
field=models.TextField(blank=True, max_length=1000),
),
migrations.AddField(
model_name='ifg',
name='intern_notes',
field=models.TextField(blank=True, max_length=1000),
),
migrations.AddField(
model_name='library',
name='intern_notes',
field=models.TextField(blank=True, max_length=1000),
),
migrations.AddField(
model_name='list',
name='intern_notes',
field=models.TextField(blank=True, max_length=1000),
),
migrations.AddField(
model_name='literature',
name='intern_notes',
field=models.TextField(blank=True, max_length=1000),
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 4.1.2 on 2022-11-17 18:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0072_businesscard_intern_notes_email_intern_notes_and_more'),
]
operations = [
migrations.AddField(
model_name='account',
name='intern_notes',
field=models.TextField(blank=True, max_length=1000),
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 4.1.2 on 2022-11-17 18:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0073_account_intern_notes'),
]
operations = [
migrations.AddField(
model_name='project',
name='intern_notes',
field=models.TextField(blank=True, max_length=1000),
),
]

View File

@ -55,7 +55,7 @@ class Account(models.Model):
code = models.CharField('Kostenstelle', max_length=5, default="DEF", code = models.CharField('Kostenstelle', max_length=5, default="DEF",
null=False, primary_key = True) null=False, primary_key = True)
description = models.CharField('Beschreibung', max_length=60, default='NO DESCRIPTION') description = models.CharField('Beschreibung', max_length=60, default='NO DESCRIPTION')
intern_notes = models.TextField(max_length=1000, blank=True)
def __str__(self): def __str__(self):
return f"{self.code} {self.description}" return f"{self.code} {self.description}"
@ -79,6 +79,7 @@ class Project(Volunteer):
account = models.ForeignKey('Account', on_delete=models.CASCADE, null=True, to_field='code', db_constraint = False) account = models.ForeignKey('Account', on_delete=models.CASCADE, null=True, to_field='code', db_constraint = False)
granted_from = models.CharField(max_length=100,null=True,verbose_name='Bewilligt von') granted_from = models.CharField(max_length=100,null=True,verbose_name='Bewilligt von')
notes = models.TextField(max_length=1000,null=True,blank=True,verbose_name='Anmerkungen') notes = models.TextField(max_length=1000,null=True,blank=True,verbose_name='Anmerkungen')
intern_notes = models.TextField(max_length=1000, blank=True)
# the following Fields are not supposed to be edited by users # the following Fields are not supposed to be edited by users
pid = models.CharField(max_length=15, null=True, blank=True) pid = models.CharField(max_length=15, null=True, blank=True)
@ -190,7 +191,7 @@ class Library(Grant):
) )
library = models.CharField(max_length=200) library = models.CharField(max_length=200)
duration = models.CharField(max_length=100, verbose_name="Dauer") duration = models.CharField(max_length=100, verbose_name="Dauer")
intern_notes = models.TextField(max_length=1000, blank=True)
def __str__(self): def __str__(self):
return self.library return self.library
@ -209,11 +210,12 @@ class Literature(Grant):
help_text="Bitte gib an, wo du das Werk kaufen möchtest.") help_text="Bitte gib an, wo du das Werk kaufen möchtest.")
selfbuy = models.CharField( max_length=10, verbose_name='Selbstkauf?', choices=SELFBUY_CHOICES.items(), default='TRUE') selfbuy = models.CharField( max_length=10, verbose_name='Selbstkauf?', choices=SELFBUY_CHOICES.items(), default='TRUE')
selfbuy_give_data = models.BooleanField(default='NONE', verbose_name=format_html('Datenweitergabe erlauben'), help_text=format_html('Weitergabe meiner Daten (Name, Postadresse) an den von mir angegebenen Anbieter/Dienstleister.')) selfbuy_give_data = models.BooleanField(default='NONE', verbose_name=format_html('Datenweitergabe erlauben'), help_text=format_html('Weitergabe meiner Daten (Name, Postadresse) an den von mir angegebenen Anbieter/Dienstleister.'))
intern_notes = models.TextField(max_length=1000, blank=True)
class IFG(Grant): class IFG(Grant):
url = models.URLField(max_length=2000, verbose_name="URL", url = models.URLField(max_length=2000, verbose_name="URL",
help_text="Bitte gib den Link zu deiner Anfrage bei Frag den Staat an.") help_text="Bitte gib den Link zu deiner Anfrage bei Frag den Staat an.")
intern_notes = models.TextField(max_length=1000, blank=True)
def __str__(self): def __str__(self):
return "IFG-Anfrage von " + self.realname return "IFG-Anfrage von " + self.realname
@ -249,11 +251,13 @@ class Email(Domain):
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') adult = models.CharField( max_length=10, verbose_name='Volljährigkeit', choices=ADULT_CHOICES.items(), default='NONE')
intern_notes = models.TextField(max_length=1000, blank=True)
class List(Domain): class List(Domain):
address = models.CharField(max_length=50, default='NO_ADDRESS', address = models.CharField(max_length=50, default='NO_ADDRESS',
verbose_name="Adressbestandteil für Projektmailingliste", verbose_name="Adressbestandteil für Projektmailingliste",
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."))
intern_notes = models.TextField(max_length=1000, blank=True)
PROJECT_CHOICE = {'PEDIA': 'Wikipedia', PROJECT_CHOICE = {'PEDIA': 'Wikipedia',
'SOURCE': 'Wikisource', 'SOURCE': 'Wikisource',
@ -291,3 +295,4 @@ class BusinessCard(Extern):
sent_to = models.TextField(max_length=1000, verbose_name='Versandadresse', sent_to = models.TextField(max_length=1000, verbose_name='Versandadresse',
default='', help_text="Bitte gib den Namen und die vollständige Adresse ein, an welche die Visitenkarten geschickt werden sollen.") default='', help_text="Bitte gib den Namen und die vollständige Adresse ein, an welche die Visitenkarten geschickt werden sollen.")
send_data_to_print = models.BooleanField(default=False, verbose_name=format_html('Datenweitergabe erlauben'), help_text=format_html('Hiermit erlaube ich die Weitergabe meiner Daten (Name, Postadresse) an den von Wikimedia Deutschland ausgewählten Dienstleister (z. B. <a href="wir-machen-druck.de">wir-machen-druck.de</a>) zum Zwecke des direkten Versands der Druckerzeugnisse an mich.')) send_data_to_print = models.BooleanField(default=False, verbose_name=format_html('Datenweitergabe erlauben'), help_text=format_html('Hiermit erlaube ich die Weitergabe meiner Daten (Name, Postadresse) an den von Wikimedia Deutschland ausgewählten Dienstleister (z. B. <a href="wir-machen-druck.de">wir-machen-druck.de</a>) zum Zwecke des direkten Versands der Druckerzeugnisse an mich.'))
intern_notes = models.TextField(max_length=1000, blank=True)