Merge branch 'weekmail' into 'master'

color to hexa and change email for weekmail

See merge request !70
This commit is contained in:
Skia 2017-05-05 15:33:13 +02:00
commit 7c069bb3ee
3 changed files with 9 additions and 8 deletions

View File

@ -115,7 +115,7 @@ class Weekmail(models.Model):
email = EmailMultiAlternatives( email = EmailMultiAlternatives(
subject=self.title, subject=self.title,
body=self.render_text(), body=self.render_text(),
from_email=settings.DEFAULT_FROM_EMAIL, from_email=settings.SITH_COM_EMAIL,
to=Sith.objects.first().weekmail_destinations.split(' '), to=Sith.objects.first().weekmail_destinations.split(' '),
bcc=dest, bcc=dest,
) )

View File

@ -10,16 +10,16 @@ img {
</style> </style>
<div style="background: #CBD1DD; padding: 0px 5%;"> <div style="background: #CBD1DD; padding: 0px 5%;">
<div style="background: #F9FAFB;"> <div style="background: #F9FAFB;">
<h2 style="background: #304C83; color: hsl(219.6, 20.8%, 98%)">{{ weekmail.title }}</h2> <h2 style="background: #304C83; color: #f9fafb">{{ weekmail.title }}</h2>
<img src="{{ weekmail.get_banner() }}" <img src="{{ weekmail.get_banner() }}"
id="OWATemporaryImageDivContainerBannerForOutlook" id="OWATemporaryImageDivContainerBannerForOutlook"
> >
{% if weekmail.intro %} {% if weekmail.intro %}
<h3 style="background: #E3A11C; color: hsl(219.6, 20.8%, 98%)">{% trans %}Intro{% endtrans %}</h3> <h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Intro{% endtrans %}</h3>
{{ weekmail.intro|markdown }} {{ weekmail.intro|markdown }}
{% endif %} {% endif %}
<h3 style="background: #E3A11C; color: hsl(219.6, 20.8%, 98%)">{% trans %}Table of content{% endtrans %}</h3> <h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Table of content{% endtrans %}</h3>
<ul> <ul>
{% for a in weekmail.articles.all() %} {% for a in weekmail.articles.all() %}
<li>[{{ a.club }}] {{ a.title }}</li> <li>[{{ a.club }}] {{ a.title }}</li>
@ -27,22 +27,22 @@ img {
</ul> </ul>
{%- for a in weekmail.articles.all() %} {%- for a in weekmail.articles.all() %}
<h3 style="background: #E3A11C; color: hsl(219.6, 20.8%, 98%)">[{{ a.club }}] {{ a.title }}</h3> <h3 style="background: #E3A11C; color: #f9fafb">[{{ a.club }}] {{ a.title }}</h3>
{{ a.content|markdown }} {{ a.content|markdown }}
{%- endfor -%} {%- endfor -%}
{%- if weekmail.joke %} {%- if weekmail.joke %}
<h3 style="background: #E3A11C; color: hsl(219.6, 20.8%, 98%)">{% trans %}Joke{% endtrans %}</h3> <h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Joke{% endtrans %}</h3>
{{ weekmail.joke|markdown }} {{ weekmail.joke|markdown }}
{% endif -%} {% endif -%}
{%- if weekmail.protip %} {%- if weekmail.protip %}
<h3 style="background: #E3A11C; color: hsl(219.6, 20.8%, 98%)">{% trans %}Pro tip{% endtrans %}</h3> <h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Pro tip{% endtrans %}</h3>
{{ weekmail.protip|markdown }} {{ weekmail.protip|markdown }}
{% endif -%} {% endif -%}
{%- if weekmail.conclusion %} {%- if weekmail.conclusion %}
<h3 style="background: #E3A11C; color: hsl(219.6, 20.8%, 98%)">{% trans %}Final word{% endtrans %}</h3> <h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Final word{% endtrans %}</h3>
{{ weekmail.conclusion|markdown }} {{ weekmail.conclusion|markdown }}
{% endif -%} {% endif -%}

View File

@ -237,6 +237,7 @@ LOGIN_URL = '/login'
LOGOUT_URL = '/logout' LOGOUT_URL = '/logout'
LOGIN_REDIRECT_URL = '/' LOGIN_REDIRECT_URL = '/'
DEFAULT_FROM_EMAIL="bibou@git.an" DEFAULT_FROM_EMAIL="bibou@git.an"
SITH_COM_EMAIL="bibou_com@git.an"
# Email # Email
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'