forked from beba/foerderbarometer
auto formatting: removed whitespace
This commit is contained in:
parent
eb44094639
commit
d5e6a7c343
|
|
@ -43,7 +43,7 @@ class ProjectAdmin(admin.ModelAdmin):
|
||||||
|
|
||||||
@admin.register(BusinessCard)
|
@admin.register(BusinessCard)
|
||||||
class BusinessCardAdmin(admin.ModelAdmin):
|
class BusinessCardAdmin(admin.ModelAdmin):
|
||||||
save_as = True
|
save_as = True
|
||||||
search_fields = ('realname', 'service_id', 'granted', 'granted_date', 'project')
|
search_fields = ('realname', 'service_id', 'granted', 'granted_date', 'project')
|
||||||
list_display = ('realname', 'service_id', 'granted', 'granted_date', 'project')
|
list_display = ('realname', 'service_id', 'granted', 'granted_date', 'project')
|
||||||
list_display_links = ('realname', 'service_id')
|
list_display_links = ('realname', 'service_id')
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ HOTEL_CHOICES = {'TRUE': format_html('Hotelzimmer benötigt'),
|
||||||
|
|
||||||
class TravelForm(FdbForm):
|
class TravelForm(FdbForm):
|
||||||
# TODO: add some javascript to show/hide other-field
|
# TODO: add some javascript to show/hide other-field
|
||||||
|
|
||||||
# this is the code, to change required to false if needed
|
# this is the code, to change required to false if needed
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
@ -96,14 +96,14 @@ class LibraryForm(FdbForm):
|
||||||
exclude = ['intern_notes', 'survey_mail_send', 'mail_state']
|
exclude = ['intern_notes', 'survey_mail_send', 'mail_state']
|
||||||
|
|
||||||
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']
|
exclude = ['intern_notes']
|
||||||
class Media:
|
class Media:
|
||||||
js = ('dropdown/js/otrs_link.js',)
|
js = ('dropdown/js/otrs_link.js',)
|
||||||
|
|
||||||
|
|
||||||
class IFGForm(FdbForm):
|
class IFGForm(FdbForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
@ -156,7 +156,7 @@ ADULT_CHOICES = {'TRUE': format_html('Ich bin volljährig.'),
|
||||||
class EmailForm(CheckForm):
|
class EmailForm(CheckForm):
|
||||||
|
|
||||||
termstoaccept = settings.NUTZUNGSBEDINGUNGEN_EMAIL_SERVICE
|
termstoaccept = settings.NUTZUNGSBEDINGUNGEN_EMAIL_SERVICE
|
||||||
|
|
||||||
# this is the code, to change required to false if needed
|
# this is the code, to change required to false if needed
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
@ -187,7 +187,7 @@ class BusinessCardForm(CheckForm):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = BusinessCard
|
model = BusinessCard
|
||||||
exclude = ['intern_notes', 'survey_mail_send', 'mail_state']
|
exclude = ['intern_notes', 'survey_mail_send', 'mail_state']
|
||||||
fields = ['project', 'data', 'variant', 'url_of_pic', 'send_data_to_print', 'sent_to']
|
fields = ['project', 'data', 'variant', 'url_of_pic', 'send_data_to_print', 'sent_to']
|
||||||
class Media:
|
class Media:
|
||||||
js = ('dropdown/js/businessCard.js',)
|
js = ('dropdown/js/businessCard.js',)
|
||||||
|
|
@ -199,4 +199,3 @@ class ListForm(CheckForm):
|
||||||
model = List
|
model = List
|
||||||
fields = ['domain', 'address']
|
fields = ['domain', 'address']
|
||||||
exclude = ['intern_notes', 'survey_mail_send','mail_state']
|
exclude = ['intern_notes', 'survey_mail_send','mail_state']
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from input.models import Project, Library, HonoraryCertificate, Travel, Email,\
|
||||||
BusinessCard, List, IFG, Literature
|
BusinessCard, List, IFG, Literature
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
''' mails will be send here:
|
''' mails will be sent here:
|
||||||
|
|
||||||
- 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
|
||||||
|
|
@ -65,14 +65,14 @@ class Command(BaseCommand):
|
||||||
def end_of_projects_reached(self):
|
def end_of_projects_reached(self):
|
||||||
''' end of project reached '''
|
''' end of project reached '''
|
||||||
# get all projects which ended
|
# get all projects which ended
|
||||||
|
|
||||||
old = Project.objects.filter(end__lt = date.today())\
|
old = Project.objects.filter(end__lt = date.today())\
|
||||||
.exclude(end_mail_send = True)\
|
.exclude(end_mail_send = True)\
|
||||||
.filter(mail_state = 'NONE')
|
.filter(mail_state = 'NONE')
|
||||||
|
|
||||||
txt_mail_template = get_template('input/if_end_of_project.txt')
|
txt_mail_template = get_template('input/if_end_of_project.txt')
|
||||||
html_mail_template = get_template('input/if_end_of_project.html')
|
html_mail_template = get_template('input/if_end_of_project.html')
|
||||||
|
|
||||||
|
|
||||||
for project in old:
|
for project in old:
|
||||||
context = {'project': project}
|
context = {'project': project}
|
||||||
|
|
@ -170,7 +170,7 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
html_mail_template = get_template('input/if_not_of_project_approved.html')
|
html_mail_template = get_template('input/if_not_of_project_approved.html')
|
||||||
txt_mail_template = get_template('input/if_not_of_project_approved.txt')
|
txt_mail_template = get_template('input/if_not_of_project_approved.txt')
|
||||||
|
|
||||||
txt_informMail_template = get_template('input/if_end_of_project_orginformed.txt')
|
txt_informMail_template = get_template('input/if_end_of_project_orginformed.txt')
|
||||||
html_informMail_template = get_template('input/if_end_of_project_orginformed.html')
|
html_informMail_template = get_template('input/if_end_of_project_orginformed.html')
|
||||||
# send the mail to project.email, which would be the mail of the volunteer that filled out the form
|
# send the mail to project.email, which would be the mail of the volunteer that filled out the form
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue