django-codenerix-email 4.0.18__py2.py3-none-any.whl → 4.0.20__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- __version__ = "4.0.18"
1
+ __version__ = "4.0.20"
2
2
 
3
3
  __authors__ = [
4
4
  "Juan Miguel Taboada Godoy <juanmi@juanmitaboada.com>",
codenerix_email/models.py CHANGED
@@ -175,6 +175,17 @@ class EmailMessage(CodenerixModel, Debugger):
175
175
  self.opened = timezone.now()
176
176
  self.save()
177
177
 
178
+ @property
179
+ def headers(self):
180
+ headers = {}
181
+ if self.unsubscribe_url:
182
+ headers["List-Unsubscribe"] = f"<{self.unsubscribe_url}>"
183
+ headers[
184
+ "List-Unsubscribe-Post"
185
+ ] = "List-Unsubscribe=One-Click"
186
+ return headers
187
+
188
+
178
189
  @classmethod
179
190
  def process_queue(
180
191
  cls, connection=None, legacy=False, silent=True, debug=False
@@ -353,24 +364,14 @@ class EmailMessage(CodenerixModel, Debugger):
353
364
 
354
365
  if connection:
355
366
 
356
- # Prepare headers
357
- headers = {}
358
-
359
- # If unsubscribe_url is set, add List-Unsubscribe header
360
- if self.unsubscribe_url:
361
- headers["List-Unsubscribe"] = f"<{self.unsubscribe_url}>"
362
- headers[
363
- "List-Unsubscribe-Post"
364
- ] = "List-Unsubscribe=One-Click"
365
-
366
367
  email = EM(
367
368
  subject=self.subject,
368
369
  body=self.body,
369
370
  from_email=self.efrom,
370
371
  to=[self.eto],
371
372
  connection=connection,
373
+ headers = self.headers
372
374
  )
373
- email.headers = headers
374
375
  email.content_subtype = self.content_subtype
375
376
  for at in self.attachments.all():
376
377
  with open(at.path) as f:
@@ -13,7 +13,7 @@
13
13
  <span title="{{row.opened}}" codenerix-html-compile="row.opened|codenerix:'bool'"><span>
14
14
  </td>
15
15
  <td>{{row.eto|codenerix}}</td>
16
- <td>{{row.subject|codenerix}}</td>
16
+ <td><nobr>{{row.subject|codenerix}}</nobr></td>
17
17
  <td><center>{{row.retries|codenerix}}</center></td>
18
18
  <td class="text-nowrap">{{row.next_retry|codenerix}}</td>
19
19
  <td><center>{{row.pk|codenerix}}</center></td>
@@ -26,11 +26,11 @@
26
26
  </button>
27
27
  </center>
28
28
  </td>
29
- <td>
29
+ <td ng-click="$event.stopPropagation();" align="center">
30
30
  <span codenerix-html-compile="row.uuid|codenerix:'copytoclipboard:UUID:UUID copiado al portapapales...':codenerix_inner_element">
31
31
  <span class="fa fa-barcode"></span>
32
32
  </span>
33
33
  </td>
34
- <td>
35
- <span codenerix-html-compile="row.unsubscribe_url|codenerix:'link'">
34
+ <td ng-click="$event.stopPropagation();" align="center">
35
+ <span codenerix-html-compile="row.unsubscribe_url|codenerix:'link:blank:onlyicon'">
36
36
  </td>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-codenerix-email
3
- Version: 4.0.18
3
+ Version: 4.0.20
4
4
  Summary: Codenerix Email is a module that enables CODENERIX to set send emails in a general manner.
5
5
  Home-page: https://github.com/codenerix/django-codenerix-email
6
6
  Author: Juan Miguel Taboada Godoy <juanmi@juanmitaboada.com>, Juan Soler Ruiz <soleronline@gmail.com>
@@ -1,8 +1,8 @@
1
- codenerix_email/__init__.py,sha256=Qrn9EdD3Ur3-5wBa-iA_SZPLLXK2xgk7C_r3zV2rdp0,149
1
+ codenerix_email/__init__.py,sha256=NznooP8z0g_kglbIBGRpXa3c7ipFWR0sxUZIt0zQxeU,149
2
2
  codenerix_email/admin.py,sha256=o3b-MaD7xsWeta0yfU9YNeKBmHQIcmHqXmP2t-hrrWc,1208
3
3
  codenerix_email/apps.py,sha256=WXqu1XQibDDyCvvQYt2JbTK4GIpW8BNv5DCbRJS2mmk,149
4
4
  codenerix_email/forms.py,sha256=n-UrVPI7NMXNImEdJ4uB0HWHEvBNv71YKZ_RPLW4FSg,4075
5
- codenerix_email/models.py,sha256=7cq4odD6tm3XrsmRv8u75MeJSTZ0mcytFjqyUQNC9bM,20230
5
+ codenerix_email/models.py,sha256=LSMScSZquMFgNM3zke9BZKwXm41qJ3B4aR8CapSUrtQ,20138
6
6
  codenerix_email/urls.py,sha256=QYrSJdhCp2PLrcfv_Y7X4OzxqQ0Q2-z7ObDPE-_WLdw,2595
7
7
  codenerix_email/urls_frontend.py,sha256=DG5WS_fGQJC9sezNebPwG-E_WtUWy3Kwz4VUxh82xuc,873
8
8
  codenerix_email/views.py,sha256=Bx990LC04HOdytHJoO_T0z0R_u6qm6I2Q9bXtnmf5vw,4822
@@ -71,9 +71,9 @@ codenerix_email/migrations/__pycache__/__init__.cpython-310.pyc,sha256=PdaaABMdL
71
71
  codenerix_email/migrations/__pycache__/__init__.cpython-311.pyc,sha256=RbbUUEhcJ_eAVNFAdNbkjv60hyF7BsnNOlti5xplQsY,195
72
72
  codenerix_email/migrations/__pycache__/__init__.cpython-35.pyc,sha256=2g70xiMW6oJNkIpRM-0Dr5h7AUac-3xyCXPONxp9BBw,147
73
73
  codenerix_email/migrations/__pycache__/__init__.cpython-39.pyc,sha256=qNj2NH0YvoWPnCKxkVZPsEFsbM05y7t1njMskNISdVQ,168
74
- codenerix_email/static/codenerix_email/partials/emailmessages_rows.html,sha256=7MVyGRvzGuQcDR_XTQSpEJvR7NEVSwHndV_ceoBHBdc,2010
75
- django_codenerix_email-4.0.18.dist-info/LICENSE,sha256=IXMIpi75XsrJt1Sznt4EftT9c_4X0C9eqK4tHhH8H48,11339
76
- django_codenerix_email-4.0.18.dist-info/METADATA,sha256=Fjl3eUEB8J77qvgIxzstgZrO_QRWL3LmfaAf-o6S5eQ,2640
77
- django_codenerix_email-4.0.18.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
78
- django_codenerix_email-4.0.18.dist-info/top_level.txt,sha256=lljSA0iKE_UBEM5gIrGQwioC_i8Jjnp-aR1LFElENgw,16
79
- django_codenerix_email-4.0.18.dist-info/RECORD,,
74
+ codenerix_email/static/codenerix_email/partials/emailmessages_rows.html,sha256=e-57Lh_Ozh8uX8nx98vE0OSqFwi1CvcdMApTDUfa8lw,2142
75
+ django_codenerix_email-4.0.20.dist-info/LICENSE,sha256=IXMIpi75XsrJt1Sznt4EftT9c_4X0C9eqK4tHhH8H48,11339
76
+ django_codenerix_email-4.0.20.dist-info/METADATA,sha256=yqB25aU80ttOXaFDL5wGK0bqez6yXVSdwrpVERVn9jQ,2640
77
+ django_codenerix_email-4.0.20.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
78
+ django_codenerix_email-4.0.20.dist-info/top_level.txt,sha256=lljSA0iKE_UBEM5gIrGQwioC_i8Jjnp-aR1LFElENgw,16
79
+ django_codenerix_email-4.0.20.dist-info/RECORD,,