Skip to content

Commit f02d887

Browse files
committed
Update contents and add send with text
Signed-off-by: Toomore Chiang <[email protected]>
1 parent 0819a2e commit f02d887

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

module/sender.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ def __init__(self, template_path: str, subject: str,
150150
source = setting.AWS_SES_FROM
151151

152152
if 'text_body' in content and content['text_body']:
153-
self.text_body = content['text_body']
153+
self.text_body = SandboxedEnvironment(
154+
).from_string(content['text_body'])
154155

155156
self.awsses = AWSSES(aws_access_key_id=setting.AWS_ID,
156157
aws_secret_access_key=setting.AWS_KEY, source=source)
@@ -171,7 +172,7 @@ def send(self, to_list: list[dict[str, str]],
171172
to_addresses=to_list,
172173
subject=self.subject.render(**data),
173174
body=self.tpl.render(**data),
174-
text_body=self.text_body,
175+
text_body=self.text_body.render(**data),
175176
x_coscup=x_coscup,
176177
list_unsubscribe=setting.AWS_LIST_UNSUBSCRIBE,
177178
)

templates/base.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<meta property="og:image" content="https://volunteer.coscup.org/img/coscup_volunteer_og.png">
1717
<meta property="og:description" content="完成志工成員登錄、各屆組織建立、住宿、交通費補助等行政事宜。Volunteer with COSCUP!">
1818
{%endblock%}
19-
<meta name="theme-color" content="#48c774">
19+
<meta name="theme-color" content="#48c78e">
2020
<meta name="google-site-verification" content="bNlKpOt_7KyKFIigR-8ZHnAVn4z-rLm8FdVIGC_wlTU" />
2121
{%block header%}{%endblock%}
2222
<style>

templates/form_accommodation.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h3 class="is-size-4">住宿資訊</h3>
5454
<tr>
5555
<td>住宿地點</td>
5656
<td>方舟旅店 - 長安復興館 10492 台北市中山區長安東路二段 246 號 3F<br>
57-
<small>(check-in 時說是<span class="tag is-success is-light">COSCUP</span><span class="tag is-success is-light">開放文化基金會</span></small></td>
57+
<small>Check-in:15:00,check-in 時說是<span class="tag is-success is-light">COSCUP</span><span class="tag is-success is-light">開放文化基金會</span></small></td>
5858
</tr>
5959
<tr>
6060
<td>住宿時間</td>

templates/tasks_project.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ <h2 class="subtitle">
7575
<div class="content">
7676
<div class="notification is-warning is-light">
7777
<span class="icon"><i class="fas fa-info-circle"></i></span>
78-
如果你對任務有疑問或是突然找不到任務負責人,請前往<strong>任務總部—「志工服務台」<sup>(TR 2F)</sup></strong>,我們將會使用 1893 年特斯拉所發明的<a href="https://zh.wikipedia.org/zh-tw/%E6%97%A0%E7%BA%BF%E7%94%B5">技術</a>、招喚各地的秘密特工緊急協尋任務負責人。
78+
如果你對任務有疑問或是突然找不到任務負責人,請前往<strong>任務總部—「志工服務台」<sup>(TR 3F)</sup></strong>,我們將會使用 1893 年特斯拉所發明的<a href="https://zh.wikipedia.org/zh-tw/%E6%97%A0%E7%BA%BF%E7%94%B5">技術</a>、招喚各地的秘密特工緊急協尋任務負責人。
7979
</div>
8080
</div>
8181
</div>
@@ -304,7 +304,7 @@ <h4>Detail</h4>
304304
v-if="modal.creator && Object.keys(modal.creator).length > 0">
305305
<div class="message-body">
306306
<span class="icon"><i class="fas fa-info-circle"></i></span>
307-
<span>請在時間開始前找到<strong>任務負責人:[[modal.creator.name]]</strong> 開始任務,有任何疑問可以直接詢問 <strong>[[ modal.creator.name ]]</strong>或是前往大會服務台旁的<strong>志工服務台</strong>,我們有專人為您服務。</span>
307+
<span>請在時間開始前找到<strong>任務負責人:[[modal.creator.name]]</strong> 開始任務,有任何疑問可以直接詢問 <strong>[[ modal.creator.name ]]</strong>或是前往<strong>TR-309 志工服務台</strong>,我們有專人為您服務。</span>
308308
</div>
309309
</article>
310310
</div>

view/tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@VIEW_TASKS.route('/')
1717
def index():
1818
''' Index page '''
19-
return redirect(url_for('tasks.project', pid='2020', _scheme='https', _external=True))
19+
return redirect(url_for('tasks.project', pid='2022', _scheme='https', _external=True))
2020

2121

2222
@VIEW_TASKS.route('/<pid>', methods=('GET', 'POST'))

0 commit comments

Comments
 (0)