Merge remote-tracking branch 'origin/master' into test-report

This commit is contained in:
kououken 2019-03-08 17:11:28 -08:00
commit 48e9f043a4
5 changed files with 9 additions and 11 deletions

2
.gitignore vendored
View file

@ -2,7 +2,6 @@
# Edit at https://www.gitignore.io/?templates=linux,macos,python,django,windows,pycharm,intellij,visualstudio # Edit at https://www.gitignore.io/?templates=linux,macos,python,django,windows,pycharm,intellij,visualstudio
### Django ### ### Django ###
*.env
*.log *.log
*.pot *.pot
*.pyc *.pyc
@ -101,7 +100,6 @@ celerybeat-schedule
*.sage.py *.sage.py
# Environments # Environments
.env
.venv .venv
env/ env/
venv/ venv/

View file

@ -1,4 +0,0 @@
EMAIL_HOST_USER=accountemail@yourmail.com
EMAIL_HOST_PASSWORD=accountpasswordhere
SUBMIT_REPORT_DESTINATION_EMAIL=to-address@yourmail.com
SUBMIT_REPORT_FROM_EMAIL=from-address@yourmail.com

View file

@ -12,7 +12,11 @@
{% for field in section.fields %} {% for field in section.fields %}
<tr> <tr>
<td>{{field.label}}</td> <td>{{field.label}}</td>
<td>{{field.value|default:""}}</td> <td>{% if field.field_type == 'boolean' %}
{{field.value|yesno:"yes,no"}}
{% else %}
{{field.value|default:" "}}
{% endif %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
{% for rule in section.rule_violations %} {% for rule in section.rule_violations %}

View file

@ -5,12 +5,12 @@
Title: {{title}} Title: {{title}}
Reference #: {{reference_number}} Reference #: {{reference_number}}
{% for section in sections %} {% for section in sections %}{% if section.completed %}
{{section.title}}(SID: {{section.id}}) {{section.title}}(SID: {{section.id}})
{% for field in section.fields %} {% for field in section.fields %}
{{field.label}}: {{field.value|default:"empty"}} {{field.label}}: {% if field.field_type == 'boolean' %}{{field.value|yesno:"yes,no"}}{% else %}{{field.value|default:" "}}{% endif %}
{% endfor %} {% endfor %}
{% for rule in section.rule_violations %} {% for rule in section.rule_violations %}
[RULE] {{rule.label}}: {{rule.rule_break_text}} [RULE] {{rule.label}}: {{rule.rule_break_text}}
{% endfor %} {% endfor %}
{% endfor %} {% endif %}{% endfor %}

View file

@ -415,7 +415,7 @@ def send_report_to_admin(request, report_pk, status):
message = None message = None
if params['reference_number'] == '': if params['reference_number'] == '':
message = EmailMultiAlternatives( message = EmailMultiAlternatives(
"[Reimbursinator {}] ({})".format(params['title'], status), "[Reimbursinator] {} ({})".format(params['title'], status),
msg_plain, msg_plain,
from_email, from_email,
[to_email], [to_email],