django-ctct 0.0.1.dev6__tar.gz → 0.0.1.dev7__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_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/PKG-INFO +40 -42
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/README.md +30 -22
- django_ctct-0.0.1.dev7/django_ctct/admin.py +809 -0
- django_ctct-0.0.1.dev7/django_ctct/apps.py +33 -0
- django_ctct-0.0.1.dev7/django_ctct/conf.py +90 -0
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/management/commands/import_ctct.py +74 -90
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/managers.py +301 -269
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/models.py +486 -490
- django_ctct-0.0.1.dev7/django_ctct/py.typed +0 -0
- django_ctct-0.0.1.dev7/django_ctct/todo.md +84 -0
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/urls.py +2 -2
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/utils.py +20 -12
- django_ctct-0.0.1.dev7/django_ctct/views.py +37 -0
- django_ctct-0.0.1.dev7/pyproject.toml +107 -0
- django_ctct-0.0.1.dev7/pyproject.toml.orig +102 -0
- django_ctct-0.0.1.dev6/LICENSE +0 -21
- django_ctct-0.0.1.dev6/django_ctct/admin.py +0 -697
- django_ctct-0.0.1.dev6/django_ctct/apps.py +0 -25
- django_ctct-0.0.1.dev6/django_ctct/signals.py +0 -41
- django_ctct-0.0.1.dev6/django_ctct/views.py +0 -23
- django_ctct-0.0.1.dev6/pyproject.toml +0 -57
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/__init__.py +0 -0
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/management/__init__.py +0 -0
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/management/commands/__init__.py +0 -0
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/migrations/0001_initial.py +0 -0
- {django_ctct-0.0.1.dev6 → django_ctct-0.0.1.dev7}/django_ctct/migrations/__init__.py +0 -0
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: django-ctct
|
|
3
|
-
Version: 0.0.1.
|
|
3
|
+
Version: 0.0.1.dev7
|
|
4
4
|
Summary: A Django interface for the Constant Contact API
|
|
5
|
-
License: MIT
|
|
6
|
-
License-File: LICENSE
|
|
7
5
|
Author: Geoffrey Eisenbarth
|
|
8
|
-
Author-email: geoffrey.eisenbarth@gmail.com
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
-
Requires-Dist: django (>=4.2)
|
|
18
|
-
Requires-Dist: mypy (>=1.19.0,<2.0.0)
|
|
19
|
-
Requires-Dist: pyjwt[crypto] (>=2.10.1,<3.0.0)
|
|
20
|
-
Requires-Dist: ratelimit (>=2.2.1,<3.0.0)
|
|
21
|
-
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
22
|
-
Requires-Dist: tqdm (>=4.67.1,<5.0.0)
|
|
6
|
+
Author-email: Geoffrey Eisenbarth <geoffrey.eisenbarth@gmail.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Requires-Dist: django>=6.0
|
|
9
|
+
Requires-Dist: requests>=2.32.3,<3.0.0
|
|
10
|
+
Requires-Dist: ratelimit>=2.2.1,<3.0.0
|
|
11
|
+
Requires-Dist: tqdm>=4.67.1,<5.0.0
|
|
12
|
+
Requires-Dist: pyjwt[crypto]>=2.10.1,<3.0.0
|
|
13
|
+
Requires-Python: >=3.12
|
|
23
14
|
Description-Content-Type: text/markdown
|
|
24
15
|
|
|
25
16
|
# Constant Contact Integration for Django
|
|
@@ -48,7 +39,7 @@ In your Django project's settings.py file, add `'django_ctct'` to the `'INSTALLE
|
|
|
48
39
|
```python
|
|
49
40
|
INSTALLED_APPS = [
|
|
50
41
|
# ... django apps
|
|
51
|
-
|
|
42
|
+
"django_ctct",
|
|
52
43
|
# ... other apps
|
|
53
44
|
]
|
|
54
45
|
```
|
|
@@ -62,8 +53,8 @@ from django.contrib import admin
|
|
|
62
53
|
from django.urls import path, include
|
|
63
54
|
|
|
64
55
|
urlpatterns = [
|
|
65
|
-
path(
|
|
66
|
-
path(
|
|
56
|
+
path("admin/", admin.site.urls),
|
|
57
|
+
path("django-ctct/", include("django_ctct.urls")),
|
|
67
58
|
# ... other URL patterns
|
|
68
59
|
]
|
|
69
60
|
```
|
|
@@ -84,28 +75,30 @@ CTCT_REDIRECT_URI = "REDIRECT_URI_FROM_CTCT"
|
|
|
84
75
|
CTCT_FROM_NAME = "YOUR_EMAIL_NAME"
|
|
85
76
|
CTCT_FROM_EMAIL = "YOUR_EMAIL_ADDRESS"
|
|
86
77
|
|
|
87
|
-
# Optional settings
|
|
78
|
+
# Optional settings, callables will receive the EmailCampaign object as an argument
|
|
88
79
|
CTCT_REPLY_TO_EMAIL = "YOUR_REPLY_TO_ADDRESS"
|
|
89
80
|
CTCT_PHYSICAL_ADDRESS = {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
81
|
+
"address_line1": "1060 W Addison St",
|
|
82
|
+
"address_line2": "",
|
|
83
|
+
"address_optional": "",
|
|
84
|
+
"city": "Chicago",
|
|
85
|
+
"country_code": "US",
|
|
86
|
+
"country_name": "United States",
|
|
87
|
+
"organization_name": "Wrigley Field",
|
|
88
|
+
"postal_code": "60613",
|
|
89
|
+
"state_code": "IL",
|
|
99
90
|
}
|
|
100
91
|
CTCT_PREVIEW_RECIPIENTS = (
|
|
101
|
-
(
|
|
102
|
-
(
|
|
92
|
+
("First Recipient", "first@recipient.com"),
|
|
93
|
+
("Second Recipient", "second@recipient.com"),
|
|
103
94
|
)
|
|
95
|
+
CTCT_PREVIEW_RECIPIENTS_CALLABLE = "myproject.myapp.ctct.get_preview_recipients"
|
|
104
96
|
CTCT_PREVIEW_MESSAGE = "This is an EmailCampaign preview."
|
|
97
|
+
CTCT_PREVIEW_MESSAGE_CALLABLE = "myproject.myapp.ctct.get_preview_message"
|
|
105
98
|
|
|
106
99
|
# Optional functionality settings and their default settings
|
|
107
|
-
CTCT_USE_ADMIN = False
|
|
108
|
-
CTCT_SYNC_ADMIN = False
|
|
100
|
+
CTCT_USE_ADMIN = False # Add django-ctct models to admin
|
|
101
|
+
CTCT_SYNC_ADMIN = False # Django admin CRUD operations will sync with ctct account
|
|
109
102
|
```
|
|
110
103
|
|
|
111
104
|
**Important:** Store your API credentials securely. Avoid committing them directly to your version control repository.
|
|
@@ -156,16 +149,22 @@ To install dev dependencies:
|
|
|
156
149
|
```bash
|
|
157
150
|
> git clone git@github.com:geoffrey-eisenbarth/django-ctct.git
|
|
158
151
|
> cd django-ctct
|
|
159
|
-
>
|
|
160
|
-
>
|
|
161
|
-
> poetry install --with dev
|
|
152
|
+
> curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
153
|
+
> uv sync --group dev
|
|
162
154
|
```
|
|
163
155
|
|
|
164
156
|
To run tests:
|
|
165
157
|
|
|
166
158
|
```bash
|
|
167
|
-
>
|
|
168
|
-
>
|
|
159
|
+
> uv run coverage run tests/project/manage.py test
|
|
160
|
+
> uv run coverage report
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
To lint and format:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
> uv run ruff check .
|
|
167
|
+
> uv run ruff format .
|
|
169
168
|
```
|
|
170
169
|
|
|
171
170
|
|
|
@@ -188,4 +187,3 @@ This package is currently distributed under the MIT license.
|
|
|
188
187
|
## Support
|
|
189
188
|
|
|
190
189
|
If you have any issues or questions, please feel free to reach out to me on GitHub: https://github.com/geoffrey-eisenbarth/django-ctct/issues
|
|
191
|
-
|
|
@@ -24,7 +24,7 @@ In your Django project's settings.py file, add `'django_ctct'` to the `'INSTALLE
|
|
|
24
24
|
```python
|
|
25
25
|
INSTALLED_APPS = [
|
|
26
26
|
# ... django apps
|
|
27
|
-
|
|
27
|
+
"django_ctct",
|
|
28
28
|
# ... other apps
|
|
29
29
|
]
|
|
30
30
|
```
|
|
@@ -38,8 +38,8 @@ from django.contrib import admin
|
|
|
38
38
|
from django.urls import path, include
|
|
39
39
|
|
|
40
40
|
urlpatterns = [
|
|
41
|
-
path(
|
|
42
|
-
path(
|
|
41
|
+
path("admin/", admin.site.urls),
|
|
42
|
+
path("django-ctct/", include("django_ctct.urls")),
|
|
43
43
|
# ... other URL patterns
|
|
44
44
|
]
|
|
45
45
|
```
|
|
@@ -60,28 +60,30 @@ CTCT_REDIRECT_URI = "REDIRECT_URI_FROM_CTCT"
|
|
|
60
60
|
CTCT_FROM_NAME = "YOUR_EMAIL_NAME"
|
|
61
61
|
CTCT_FROM_EMAIL = "YOUR_EMAIL_ADDRESS"
|
|
62
62
|
|
|
63
|
-
# Optional settings
|
|
63
|
+
# Optional settings, callables will receive the EmailCampaign object as an argument
|
|
64
64
|
CTCT_REPLY_TO_EMAIL = "YOUR_REPLY_TO_ADDRESS"
|
|
65
65
|
CTCT_PHYSICAL_ADDRESS = {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
"address_line1": "1060 W Addison St",
|
|
67
|
+
"address_line2": "",
|
|
68
|
+
"address_optional": "",
|
|
69
|
+
"city": "Chicago",
|
|
70
|
+
"country_code": "US",
|
|
71
|
+
"country_name": "United States",
|
|
72
|
+
"organization_name": "Wrigley Field",
|
|
73
|
+
"postal_code": "60613",
|
|
74
|
+
"state_code": "IL",
|
|
75
75
|
}
|
|
76
76
|
CTCT_PREVIEW_RECIPIENTS = (
|
|
77
|
-
(
|
|
78
|
-
(
|
|
77
|
+
("First Recipient", "first@recipient.com"),
|
|
78
|
+
("Second Recipient", "second@recipient.com"),
|
|
79
79
|
)
|
|
80
|
+
CTCT_PREVIEW_RECIPIENTS_CALLABLE = "myproject.myapp.ctct.get_preview_recipients"
|
|
80
81
|
CTCT_PREVIEW_MESSAGE = "This is an EmailCampaign preview."
|
|
82
|
+
CTCT_PREVIEW_MESSAGE_CALLABLE = "myproject.myapp.ctct.get_preview_message"
|
|
81
83
|
|
|
82
84
|
# Optional functionality settings and their default settings
|
|
83
|
-
CTCT_USE_ADMIN = False
|
|
84
|
-
CTCT_SYNC_ADMIN = False
|
|
85
|
+
CTCT_USE_ADMIN = False # Add django-ctct models to admin
|
|
86
|
+
CTCT_SYNC_ADMIN = False # Django admin CRUD operations will sync with ctct account
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
**Important:** Store your API credentials securely. Avoid committing them directly to your version control repository.
|
|
@@ -132,16 +134,22 @@ To install dev dependencies:
|
|
|
132
134
|
```bash
|
|
133
135
|
> git clone git@github.com:geoffrey-eisenbarth/django-ctct.git
|
|
134
136
|
> cd django-ctct
|
|
135
|
-
>
|
|
136
|
-
>
|
|
137
|
-
> poetry install --with dev
|
|
137
|
+
> curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
138
|
+
> uv sync --group dev
|
|
138
139
|
```
|
|
139
140
|
|
|
140
141
|
To run tests:
|
|
141
142
|
|
|
142
143
|
```bash
|
|
143
|
-
>
|
|
144
|
-
>
|
|
144
|
+
> uv run coverage run tests/project/manage.py test
|
|
145
|
+
> uv run coverage report
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
To lint and format:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
> uv run ruff check .
|
|
152
|
+
> uv run ruff format .
|
|
145
153
|
```
|
|
146
154
|
|
|
147
155
|
|