-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from brunoamaral/190-the-email-template-conta…
…ins-hardcoded-information 190 the email template contains hardcoded information
- Loading branch information
Showing
12 changed files
with
67 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. | ||
from .models import CustomSetting | ||
|
||
class CustomSettingAdmin(admin.ModelAdmin): | ||
list_display = ['site','title',] | ||
|
||
|
||
admin.site.register(CustomSetting,CustomSettingAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class SitesettingsConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'sitesettings' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from django.db import models | ||
from django.contrib.sites.models import Site | ||
|
||
# Create your models here. | ||
class CustomSetting(models.Model): | ||
setting_id = models.AutoField(primary_key=True) | ||
site = models.ForeignKey(Site, on_delete=models.PROTECT) | ||
title = models.CharField(max_length=280,blank=False, null=False, unique=True) | ||
email_footer = models.TextField(blank=True,null=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.shortcuts import render | ||
|
||
# Create your views here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<title>Gregory MS update</title> | ||
<title>{{ title }} update</title> | ||
<style> | ||
@media only screen and (max-width: 620px) { | ||
table.body h1 { | ||
|
@@ -130,7 +130,7 @@ <h2 style="color: #000000; font-family: sans-serif; font-weight: 400; line-heigh | |
<li>ML GNB: {{article.ml_prediction_gnb}} </li> | ||
<li>ML LR: {{article.ml_prediction_lr }} </li> | ||
</ul> | ||
<p><a href="https://api.gregory-ms.com/articles/{{article.article_id}}/">EDIT</a></p> | ||
<p><a href="https://api.{{site.domain}}/articles/{{article.article_id}}/">EDIT</a></p> | ||
|
||
|
||
|
||
|
@@ -153,17 +153,8 @@ <h2 style="color: #000000; font-family: sans-serif; font-weight: 400; line-heigh | |
<hr> | ||
|
||
{% endfor %} | ||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">For the full list, please visit <a href="https://gregory-ms.com/" style="color: #3498db; text-decoration: underline;">https://gregory-ms.com/</a></p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">For adding people to this email list or further information, please contact Bruno Amaral:</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;"><strong>Mobile</strong>: +351 912 875 856</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;"><strong>Email</strong>: [email protected]</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">If you wish to unsubscribe, follow the link below.</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Best wishes fom your friendly research bot.<br><strong>Gregory</strong></p> | ||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">For the full list, please visit <a href="https://{{site.domain}}/" style="color: #3498db; text-decoration: underline;">https://{{site.domain}}/</a></p> | ||
{{email_footer | safe}} | ||
|
||
</td> | ||
</tr> | ||
|
@@ -181,7 +172,7 @@ <h2 style="color: #000000; font-family: sans-serif; font-weight: 400; line-heigh | |
<tr> | ||
<td class="content-block" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; color: #999999; font-size: 12px; text-align: center;" valign="top" align="center"> | ||
<span class="apple-link" style="color: #999999; font-size: 12px; text-align: center;">Gregory MS</span> | ||
<br> For more information visit <a href="https://gregory-ms.com/" style="text-decoration: underline; color: #999999; font-size: 12px; text-align: center;">https://gregory-ms.com/</a>. | ||
<br> For more information visit <a href="https://{{site.domain}}/" style="text-decoration: underline; color: #999999; font-size: 12px; text-align: center;">https://{{site.domain}}/</a>. | ||
</td> | ||
</tr> | ||
<tr> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<title>Gregory MS update</title> | ||
<title>{{ title }} update</title> | ||
<style> | ||
@media only screen and (max-width: 620px) { | ||
table.body h1 { | ||
|
@@ -131,15 +131,7 @@ <h2 style="color: #000000; font-family: sans-serif; font-weight: 400; line-heigh | |
{% endfor %} | ||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">For the full list, please visit <a href="https://gregory-ms.com/" style="color: #3498db; text-decoration: underline;">https://gregory-ms.com/</a></p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">For adding people to this email list or further information, please contact Bruno Amaral:</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;"><strong>Mobile</strong>: +351 912 875 856</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;"><strong>Email</strong>: [email protected]</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">If you wish to unsubscribe, follow the link below.</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Best wishes fomyour friendly research bot.<br><strong>Gregory</strong></p> | ||
{{email_footer | safe}} | ||
|
||
</td> | ||
</tr> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<title>Gregory MS update</title> | ||
<title>{{ title }} update</title> | ||
<style> | ||
@media only screen and (max-width: 620px) { | ||
table.body h1 { | ||
|
@@ -147,15 +147,7 @@ <h2 style="color: #000000; font-family: sans-serif; font-weight: 400; line-heigh | |
{% endfor %} | ||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">For the full list, please visit <a href="https://gregory-ms.com/" style="color: #3498db; text-decoration: underline;">https://gregory-ms.com/</a></p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">For adding people to this email list or further information, please contact Bruno Amaral:</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;"><strong>Mobile</strong>: +351 912 875 856</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;"><strong>Email</strong>: [email protected]</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">If you wish to unsubscribe, follow the link below.</p> | ||
|
||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Best wishes fom your friendly research bot.<br><strong>Gregory</strong></p> | ||
{{email_footer | safe}} | ||
|
||
</td> | ||
</tr> | ||
|