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)
 | 
			
		||||
class BusinessCardAdmin(admin.ModelAdmin):
 | 
			
		||||
    save_as = True    
 | 
			
		||||
    save_as = True
 | 
			
		||||
    search_fields = ('realname', 'service_id', 'granted', 'granted_date', 'project')
 | 
			
		||||
    list_display = ('realname', 'service_id', 'granted', 'granted_date', 'project')
 | 
			
		||||
    list_display_links = ('realname', 'service_id')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -63,7 +63,7 @@ HOTEL_CHOICES = {'TRUE': format_html('Hotelzimmer benötigt'),
 | 
			
		|||
 | 
			
		||||
class TravelForm(FdbForm):
 | 
			
		||||
    # TODO: add some javascript to show/hide other-field
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    # this is the code, to change required to false if needed
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
        super().__init__(*args, **kwargs)
 | 
			
		||||
| 
						 | 
				
			
			@ -96,14 +96,14 @@ class LibraryForm(FdbForm):
 | 
			
		|||
        exclude = ['intern_notes', 'survey_mail_send', 'mail_state']
 | 
			
		||||
 | 
			
		||||
class HonoraryCertificateForm(FdbForm):
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        model = HonoraryCertificate
 | 
			
		||||
        fields = ['request_url', 'project']
 | 
			
		||||
        exclude = ['intern_notes']
 | 
			
		||||
    class Media:
 | 
			
		||||
        js = ('dropdown/js/otrs_link.js',)
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class IFGForm(FdbForm):
 | 
			
		||||
    class Meta:
 | 
			
		||||
| 
						 | 
				
			
			@ -156,7 +156,7 @@ ADULT_CHOICES = {'TRUE': format_html('Ich bin volljährig.'),
 | 
			
		|||
class EmailForm(CheckForm):
 | 
			
		||||
 | 
			
		||||
    termstoaccept = settings.NUTZUNGSBEDINGUNGEN_EMAIL_SERVICE
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    # this is the code, to change required to false if needed
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
        super().__init__(*args, **kwargs)
 | 
			
		||||
| 
						 | 
				
			
			@ -187,7 +187,7 @@ class BusinessCardForm(CheckForm):
 | 
			
		|||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        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']
 | 
			
		||||
    class Media:
 | 
			
		||||
        js = ('dropdown/js/businessCard.js',)
 | 
			
		||||
| 
						 | 
				
			
			@ -199,4 +199,3 @@ class ListForm(CheckForm):
 | 
			
		|||
        model = List
 | 
			
		||||
        fields = ['domain', 'address']
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
class Command(BaseCommand):
 | 
			
		||||
    ''' mails will be send here:
 | 
			
		||||
    ''' mails will be sent here:
 | 
			
		||||
 | 
			
		||||
    - two weeks after confirmation of support for volunteer (/extern) send link
 | 
			
		||||
    with surveylink
 | 
			
		||||
| 
						 | 
				
			
			@ -65,14 +65,14 @@ class Command(BaseCommand):
 | 
			
		|||
    def end_of_projects_reached(self):
 | 
			
		||||
        ''' end of project reached '''
 | 
			
		||||
        # get all projects which ended
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        old = Project.objects.filter(end__lt = date.today())\
 | 
			
		||||
                             .exclude(end_mail_send = True)\
 | 
			
		||||
                             .filter(mail_state = 'NONE')
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        txt_mail_template = get_template('input/if_end_of_project.txt')
 | 
			
		||||
        html_mail_template = get_template('input/if_end_of_project.html')
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        for project in old:
 | 
			
		||||
            context = {'project': project}
 | 
			
		||||
| 
						 | 
				
			
			@ -170,7 +170,7 @@ class Command(BaseCommand):
 | 
			
		|||
 | 
			
		||||
        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_informMail_template = get_template('input/if_end_of_project_orginformed.txt')
 | 
			
		||||
        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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue