Skip to content

Commit

Permalink
Add cplus_logo using static
Browse files Browse the repository at this point in the history
  • Loading branch information
zamuzakki committed Sep 5, 2024
1 parent 061dc81 commit 033d71a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 3 deletions.
1 change: 1 addition & 0 deletions django_project/core/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
absolute_path('cplus_api', 'static'),
)

# Every cache key will get prefixed with this value - here we set it to
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 54 additions & 3 deletions django_project/cplus_api/templates/emails/analysis_completed.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@

<body lang="en" link="#DD0000" vlink="#DD0000" class="emailify" style="mso-line-height-rule:exactly;word-spacing:normal;background-color:#e5e5e5;">
<div class="bg" style="background-color:#e5e5e5;" lang="en">
<div class="r pr-16 pl-16" style="background:#4AA851;background-color:#4AA851;margin:0px auto;max-width:600px">
<div class="r pr-16 pl-16" style="margin:0px auto;max-width:600px">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="none" style="background:#4AA851;background-color:#4AA851;width:100%;">
<tbody>
<tr>
<tr style="background:#4AA851;background-color:#4AA851;">
<td style="border:none;direction:ltr;font-size:0;padding:16px 16px 16px 16px;text-align:left;">
<div class="pc100 ogf" style="font-size:0;line-height:0;text-align:left;display:inline-block;width:100%;direction:ltr;">
<div class="pc40-493 ogf m c" style="font-size:0;text-align:left;direction:ltr;display:inline-block;vertical-align:middle;width:40.4930%;">
Expand Down Expand Up @@ -291,14 +291,65 @@
</div>
</td>
</tr>
<tr style="background:#FFFFFF;background-color:#FFFFFF;">
<td style="border:none;direction:ltr;font-size:0;padding:16px 16px 16px 5px;text-align:left;">
<div class="pc100 ogf" style="font-size:0;line-height:0;text-align:left;display:inline-block;width:100%;direction:ltr;">
<div class="pc40-493 ogf m c" style="font-size:0;text-align:left;direction:ltr;display:inline-block;vertical-align:middle;width:40.4930%;">
<table border="0" cellpadding="0" cellspacing="0" role="none" style="border:none;vertical-align:middle;" width="100%">
<tbody>
<tr>
<td align="left" class="i" style="font-size:0;padding:0;word-break:break-word;">
<table border="0" cellpadding="0" cellspacing="0" role="none" style="border-collapse:collapse;border-spacing:0;">
<tbody>
<tr>
<td style="width:180px;">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="pc2-8169 ogf g" style="font-size:0;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:2.8169%;">
<table border="0" cellpadding="0" cellspacing="0" role="none" width="100%">
<tbody>
<tr>
<td style="vertical-align:top;padding:0;">
<table border="0" cellpadding="0" cellspacing="0" role="none" style width="100%">
<tbody></tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="pc56-6901 ogf c" style="font-size:0;text-align:left;direction:ltr;display:inline-block;vertical-align:middle;width:56.6901%;">
<table border="0" cellpadding="0" cellspacing="0" role="none" style="border:none;vertical-align:middle;" width="100%">
<tbody>
<tr>
<td align="right" class="x" style="font-size:0;word-break:break-word;">
<div style="text-align:left; margin-left: -10px">
<img src="{{ protocol }}://{{ domain }}/static/images/cplus_logo.png">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</td>
</tr>

</tbody>
</table>
</div>
<div class="r pr-16 pl-16" style="background:#fffffe;background-color:#fffffe;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="none" style="background:#fffffe;background-color:#fffffe;width:100%;">
<tbody>
<tr>
<td style="border:none;direction:ltr;font-size:0;padding:32px 32px 32px 32px;text-align:left;">
<td style="border:none;direction:ltr;font-size:0;padding:5px 32px 32px 32px;text-align:left;">
<div class="xc536 ogf c" style="font-size:0;text-align:left;direction:ltr;display:inline-block;vertical-align:middle;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="none" style="border:none;vertical-align:middle;" width="100%">
<tbody>
Expand Down
3 changes: 3 additions & 0 deletions django_project/cplus_api/utils/worker_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import traceback
import subprocess
from django.core.mail import send_mail
from django.contrib.sites.models import Site
from django.conf import settings
from django.utils import timezone
from django.template.loader import render_to_string
Expand Down Expand Up @@ -757,6 +758,8 @@ def notify_user(self, is_success: bool):
message = render_to_string(
'emails/analysis_completed.html',
{
'protocol': 'http' if settings.DEBUG else 'https',
'domain': Site.objects.get_current().domain,
'name': (
self.scenario_task.submitted_by.first_name if
self.scenario_task.submitted_by.first_name else
Expand Down

0 comments on commit 033d71a

Please sign in to comment.