django-codenerix-email 4.0.28__py2.py3-none-any.whl → 4.0.30__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.28"
1
+ __version__ = "4.0.30"
2
2
 
3
3
  __authors__ = [
4
4
  "Juan Miguel Taboada Godoy <juanmi@juanmitaboada.com>",
codenerix_email/forms.py CHANGED
@@ -23,7 +23,12 @@ from django.conf import settings
23
23
 
24
24
  from codenerix.forms import GenModelForm
25
25
  from codenerix.widgets import WysiwygAngularInput
26
- from codenerix_email.models import EmailTemplate, EmailMessage, MODELS
26
+ from codenerix_email.models import (
27
+ EmailTemplate,
28
+ EmailMessage,
29
+ EmailReceived,
30
+ MODELS,
31
+ )
27
32
 
28
33
 
29
34
  class EmailTemplateForm(GenModelForm):
@@ -118,6 +123,59 @@ class EmailMessageForm(GenModelForm):
118
123
  ]
119
124
 
120
125
 
126
+ class EmailReceivedForm(GenModelForm):
127
+ class Meta:
128
+ model = EmailReceived
129
+ exclude = ["sending", "log"]
130
+
131
+ # def __groups__(self):
132
+ # return [
133
+ # (
134
+ # _("Details"),
135
+ # 12,
136
+ # ["efrom", 2],
137
+ # ["eto", 2],
138
+ # ["subject", 4],
139
+ # ["priority", 1],
140
+ # ["sent", 1],
141
+ # ["error", 1],
142
+ # ["retries", 1],
143
+ # ["body", 12],
144
+ # )
145
+ # ]
146
+
147
+ @staticmethod
148
+ def __groups_details__():
149
+ return [
150
+ (
151
+ _("Details"),
152
+ 6,
153
+ ["imap_id", 3],
154
+ ["eid", 3],
155
+ ["created", 3],
156
+ ["updated", 3],
157
+ ["efrom", 3],
158
+ ["eto", 3],
159
+ ["subject", 3],
160
+ ["bounce_type", 3],
161
+ ["bounce_reason", 3],
162
+ ["email", 3],
163
+ ),
164
+ (
165
+ _("System"),
166
+ 6,
167
+ ["headers", None],
168
+ ["headers_pretty", 3],
169
+ ),
170
+ (
171
+ _("Body"),
172
+ 12,
173
+ ["body_text", 12],
174
+ ["body_html", 12],
175
+ ),
176
+ ]
177
+
178
+
121
179
  for info in MODELS:
122
180
  field = info[0]
123
181
  model = info[1]