django-codenerix-email 4.0.25__tar.gz → 4.0.27__tar.gz
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.
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/PKG-INFO +1 -1
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/__init__.py +1 -1
- django_codenerix_email-4.0.27/codenerix_email/management/commands/__pycache__/test_email.cpython-310.pyc +0 -0
- django_codenerix_email-4.0.27/codenerix_email/management/commands/test_email.py +160 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/views.py +1 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/django_codenerix_email.egg-info/PKG-INFO +1 -1
- django_codenerix_email-4.0.25/codenerix_email/management/commands/__pycache__/test_email.cpython-310.pyc +0 -0
- django_codenerix_email-4.0.25/codenerix_email/management/commands/test_email.py +0 -59
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/LICENSE +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/MANIFEST.in +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/README.rst +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/admin.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/apps.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/forms.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/__init__.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/__pycache__/__init__.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/__pycache__/__init__.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/__pycache__/__init__.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/__pycache__/__init__.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/commands/__init__.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/commands/__pycache__/__init__.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/commands/__pycache__/__init__.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/commands/__pycache__/send_emails.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/management/commands/send_emails.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0001_initial.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0002_auto_20170502_1043.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0003_auto_20170921_1206.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0004_auto_20171108_1628.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0005_emailmessage_retries.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0006_emailmessage_error.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0007_emailmessage_next_retry.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0008_auto_20171201_0928.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0009_emailmessage_opened_emailmessage_uuid.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0010_emailmessage_content_subtype_and_more.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0011_alter_emailmessage_content_subtype_and_more.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0012_emailmessage_unsubscribe_url.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/0013_emailmessage_headers.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__init__.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0001_initial.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0001_initial.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0001_initial.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0001_initial.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0002_auto_20170502_1043.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0002_auto_20170502_1043.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0002_auto_20170502_1043.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0002_auto_20170502_1043.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0003_auto_20170921_1206.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0003_auto_20170921_1206.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0003_auto_20170921_1206.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0003_auto_20170921_1206.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0004_auto_20171108_1628.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0004_auto_20171108_1628.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0004_auto_20171108_1628.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0004_auto_20171108_1628.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0005_emailmessage_retries.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0005_emailmessage_retries.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0005_emailmessage_retries.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0005_emailmessage_retries.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0006_emailmessage_error.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0006_emailmessage_error.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0006_emailmessage_error.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0006_emailmessage_error.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0007_emailmessage_next_retry.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0007_emailmessage_next_retry.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0007_emailmessage_next_retry.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0007_emailmessage_next_retry.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0008_auto_20171201_0928.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0008_auto_20171201_0928.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0008_auto_20171201_0928.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0008_auto_20171201_0928.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0009_delete_emailtemplatetexten.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0009_emailmessage_opened_emailmessage_uuid.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0009_emailmessage_opened_emailmessage_uuid.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0010_emailmessage_content_subtype_and_more.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0010_emailmessage_content_subtype_and_more.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0010_emailmessage_opened_emailmessage_uuid_and_more.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0011_alter_emailmessage_content_subtype_and_more.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0011_alter_emailmessage_content_subtype_and_more.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0012_emailmessage_unsubscribe_url.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0012_emailmessage_unsubscribe_url.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0013_emailmessage_headers.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/0013_emailmessage_headers.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/__init__.cpython-310.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/__init__.cpython-311.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/__init__.cpython-35.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/migrations/__pycache__/__init__.cpython-39.pyc +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/models.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/static/codenerix_email/partials/emailmessages_rows.html +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/urls.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/urls_frontend.py +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/django_codenerix_email.egg-info/SOURCES.txt +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/django_codenerix_email.egg-info/dependency_links.txt +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/django_codenerix_email.egg-info/not-zip-safe +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/django_codenerix_email.egg-info/requires.txt +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/django_codenerix_email.egg-info/top_level.txt +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/setup.cfg +0 -0
- {django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: django_codenerix_email
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.27
|
|
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>
|
|
Binary file
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# django-codenerix-email
|
|
4
|
+
#
|
|
5
|
+
# Codenerix GNU
|
|
6
|
+
#
|
|
7
|
+
# Project URL : http://www.codenerix.com
|
|
8
|
+
#
|
|
9
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
# you may not use this file except in compliance with the License.
|
|
11
|
+
# You may obtain a copy of the License at
|
|
12
|
+
#
|
|
13
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
#
|
|
15
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
# See the License for the specific language governing permissions and
|
|
19
|
+
# limitations under the License.
|
|
20
|
+
|
|
21
|
+
import json
|
|
22
|
+
|
|
23
|
+
from django.core.management.base import BaseCommand
|
|
24
|
+
from django.conf import settings
|
|
25
|
+
|
|
26
|
+
from codenerix_lib.debugger import Debugger
|
|
27
|
+
from codenerix_email.models import EmailMessage, EmailTemplate # type: ignore
|
|
28
|
+
from codenerix_email import __version__
|
|
29
|
+
from django.core.management import CommandError
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Command(BaseCommand, Debugger):
|
|
33
|
+
|
|
34
|
+
# Show this when the user types help
|
|
35
|
+
help = "Test"
|
|
36
|
+
|
|
37
|
+
def add_arguments(self, parser):
|
|
38
|
+
parser.add_argument(
|
|
39
|
+
"--email",
|
|
40
|
+
type=str,
|
|
41
|
+
help="Email",
|
|
42
|
+
default=None,
|
|
43
|
+
)
|
|
44
|
+
parser.add_argument(
|
|
45
|
+
"--template",
|
|
46
|
+
type=str,
|
|
47
|
+
help="Template CID",
|
|
48
|
+
default=None,
|
|
49
|
+
)
|
|
50
|
+
parser.add_argument(
|
|
51
|
+
"--context",
|
|
52
|
+
type=str,
|
|
53
|
+
help="Context as JSON",
|
|
54
|
+
default="{}",
|
|
55
|
+
)
|
|
56
|
+
parser.add_argument(
|
|
57
|
+
"--language",
|
|
58
|
+
type=str,
|
|
59
|
+
help="Language",
|
|
60
|
+
default=None,
|
|
61
|
+
)
|
|
62
|
+
parser.add_argument(
|
|
63
|
+
"--stdout",
|
|
64
|
+
action="store_true",
|
|
65
|
+
help="Print to stdout",
|
|
66
|
+
default=False,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
def handle(self, *args, **options):
|
|
70
|
+
|
|
71
|
+
# Autoconfigure Debugger
|
|
72
|
+
self.set_name("CODENERIX-EMAIL")
|
|
73
|
+
self.set_debug()
|
|
74
|
+
|
|
75
|
+
# Get arguments
|
|
76
|
+
email = options["email"]
|
|
77
|
+
template = options["template"]
|
|
78
|
+
context_str = options["context"]
|
|
79
|
+
language = options["language"]
|
|
80
|
+
stdout = options["stdout"]
|
|
81
|
+
|
|
82
|
+
# Read context
|
|
83
|
+
try:
|
|
84
|
+
context = json.loads(context_str)
|
|
85
|
+
except json.JSONDecodeError:
|
|
86
|
+
raise CommandError(
|
|
87
|
+
"Context is not a valid JSON string: {}".format(context_str)
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# If no template is provided, use the default one
|
|
91
|
+
if template is None:
|
|
92
|
+
|
|
93
|
+
# Get the default template
|
|
94
|
+
message = """Hello,
|
|
95
|
+
|
|
96
|
+
This email has been sent using Django Codenerix Email.
|
|
97
|
+
|
|
98
|
+
Best regards, Codenerix Team
|
|
99
|
+
|
|
100
|
+
--
|
|
101
|
+
Django Codenerix Email v{}
|
|
102
|
+
""".format(
|
|
103
|
+
__version__
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
def email_message_factory(context, language):
|
|
107
|
+
email_message = EmailMessage()
|
|
108
|
+
email_message.subject = "[Codenerix Email] Test"
|
|
109
|
+
email_message.body = message
|
|
110
|
+
return email_message
|
|
111
|
+
|
|
112
|
+
else:
|
|
113
|
+
# Get the template
|
|
114
|
+
try:
|
|
115
|
+
template = EmailTemplate.objects.get(cid=template)
|
|
116
|
+
except EmailTemplate.DoesNotExist:
|
|
117
|
+
raise CommandError(
|
|
118
|
+
"Template with CID {} does not exist.".format(template)
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
# Render the template
|
|
122
|
+
def email_message_factory(context, language):
|
|
123
|
+
return template.get_email(context, language)
|
|
124
|
+
|
|
125
|
+
# If no email is provided, send to all admins
|
|
126
|
+
if email is None:
|
|
127
|
+
|
|
128
|
+
# Send email to all admins
|
|
129
|
+
for name, email in settings.ADMINS:
|
|
130
|
+
email_message = email_message_factory(context, language)
|
|
131
|
+
email_message.efrom = settings.DEFAULT_FROM_EMAIL
|
|
132
|
+
email_message.eto = email
|
|
133
|
+
|
|
134
|
+
if stdout:
|
|
135
|
+
self.debug(
|
|
136
|
+
f"Sending email to {name} <{email}> "
|
|
137
|
+
f"with subject: {email_message.subject}:\n"
|
|
138
|
+
f"{email_message.body}",
|
|
139
|
+
color="white",
|
|
140
|
+
)
|
|
141
|
+
else:
|
|
142
|
+
email_message.save()
|
|
143
|
+
email_message.send(legacy=False, silent=False)
|
|
144
|
+
else:
|
|
145
|
+
|
|
146
|
+
# Send email to the specified address
|
|
147
|
+
email_message = email_message_factory(context, language)
|
|
148
|
+
email_message.efrom = settings.DEFAULT_FROM_EMAIL
|
|
149
|
+
email_message.eto = email
|
|
150
|
+
|
|
151
|
+
if stdout:
|
|
152
|
+
self.debug(
|
|
153
|
+
f"Sending email to {name} <{email}> "
|
|
154
|
+
f"with subject: {email_message.subject}:\n"
|
|
155
|
+
f"{email_message.body}",
|
|
156
|
+
color="white",
|
|
157
|
+
)
|
|
158
|
+
else:
|
|
159
|
+
email_message.save()
|
|
160
|
+
email_message.send(legacy=False, silent=False)
|
|
@@ -109,6 +109,7 @@ class EmailFollow(View):
|
|
|
109
109
|
# EmailTemplate
|
|
110
110
|
class EmailTemplateList(GenList):
|
|
111
111
|
model = EmailTemplate
|
|
112
|
+
default_ordering = ["-created"]
|
|
112
113
|
extra_context = {
|
|
113
114
|
"menu": ["codenerix_email", "emailtemplate"],
|
|
114
115
|
"bread": [_("Emails"), _("Email Template")],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: django-codenerix-email
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.27
|
|
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>
|
|
Binary file
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
#
|
|
3
|
-
# django-codenerix-email
|
|
4
|
-
#
|
|
5
|
-
# Codenerix GNU
|
|
6
|
-
#
|
|
7
|
-
# Project URL : http://www.codenerix.com
|
|
8
|
-
#
|
|
9
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
# you may not use this file except in compliance with the License.
|
|
11
|
-
# You may obtain a copy of the License at
|
|
12
|
-
#
|
|
13
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
#
|
|
15
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
# See the License for the specific language governing permissions and
|
|
19
|
-
# limitations under the License.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
from django.core.management.base import BaseCommand
|
|
23
|
-
from django.conf import settings
|
|
24
|
-
|
|
25
|
-
from codenerix_lib.debugger import Debugger
|
|
26
|
-
from codenerix_email.models import EmailMessage
|
|
27
|
-
from codenerix_email import __version__
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class Command(BaseCommand, Debugger):
|
|
31
|
-
|
|
32
|
-
# Show this when the user types help
|
|
33
|
-
help = "Test"
|
|
34
|
-
|
|
35
|
-
def handle(self, *args, **options):
|
|
36
|
-
|
|
37
|
-
# Autoconfigure Debugger
|
|
38
|
-
self.set_name("CODENERIX-EMAIL")
|
|
39
|
-
self.set_debug()
|
|
40
|
-
|
|
41
|
-
message = """Hello,
|
|
42
|
-
|
|
43
|
-
this email has been sent using Django Codenerix Email.
|
|
44
|
-
|
|
45
|
-
Best regards, Codenerix Team
|
|
46
|
-
|
|
47
|
-
--
|
|
48
|
-
Django Codenerix Email v{}""".format(
|
|
49
|
-
__version__
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
for name, email in settings.ADMINS:
|
|
53
|
-
email_message = EmailMessage()
|
|
54
|
-
email_message.efrom = settings.DEFAULT_FROM_EMAIL
|
|
55
|
-
email_message.eto = email
|
|
56
|
-
email_message.subject = "[Codenerix Email] Test"
|
|
57
|
-
email_message.body = message
|
|
58
|
-
email_message.save()
|
|
59
|
-
email_message.send(legacy=False, silent=False)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_codenerix_email-4.0.25 → django_codenerix_email-4.0.27}/codenerix_email/urls_frontend.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|