-
Notifications
You must be signed in to change notification settings - Fork 133
/
Copy pathurls.py
156 lines (154 loc) · 4.87 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
from django.urls import path, re_path
from .webhooks.amazon_ses import (
AmazonSESInboundWebhookView,
AmazonSESTrackingWebhookView,
)
from .webhooks.brevo import BrevoInboundWebhookView, BrevoTrackingWebhookView
from .webhooks.mailersend import (
MailerSendInboundWebhookView,
MailerSendTrackingWebhookView,
)
from .webhooks.mailgun import MailgunInboundWebhookView, MailgunTrackingWebhookView
from .webhooks.mailjet import MailjetInboundWebhookView, MailjetTrackingWebhookView
from .webhooks.mandrill import MandrillCombinedWebhookView
from .webhooks.postal import PostalInboundWebhookView, PostalTrackingWebhookView
from .webhooks.postmark import PostmarkInboundWebhookView, PostmarkTrackingWebhookView
from .webhooks.resend import ResendTrackingWebhookView
from .webhooks.sendgrid import SendGridInboundWebhookView, SendGridTrackingWebhookView
from .webhooks.sendinblue import (
SendinBlueInboundWebhookView,
SendinBlueTrackingWebhookView,
)
from .webhooks.sparkpost import (
SparkPostInboundWebhookView,
SparkPostTrackingWebhookView,
)
from .webhooks.unisender_go import UnisenderGoTrackingWebhookView
app_name = "anymail"
urlpatterns = [
path(
"amazon_ses/inbound/",
AmazonSESInboundWebhookView.as_view(),
name="amazon_ses_inbound_webhook",
),
path(
"brevo/inbound/",
BrevoInboundWebhookView.as_view(),
name="brevo_inbound_webhook",
),
path(
"mailersend/inbound/",
MailerSendInboundWebhookView.as_view(),
name="mailersend_inbound_webhook",
),
re_path(
# Mailgun delivers inbound messages differently based on whether
# the webhook url contains "mime" (anywhere). You can use either
# ".../mailgun/inbound/" or ".../mailgun/inbound_mime/" depending
# on the behavior you want.
r"^mailgun/inbound(_mime)?/$",
MailgunInboundWebhookView.as_view(),
name="mailgun_inbound_webhook",
),
path(
"mailjet/inbound/",
MailjetInboundWebhookView.as_view(),
name="mailjet_inbound_webhook",
),
path(
"postal/inbound/",
PostalInboundWebhookView.as_view(),
name="postal_inbound_webhook",
),
path(
"postmark/inbound/",
PostmarkInboundWebhookView.as_view(),
name="postmark_inbound_webhook",
),
path(
"sendgrid/inbound/",
SendGridInboundWebhookView.as_view(),
name="sendgrid_inbound_webhook",
),
path(
# Compatibility for old SendinBlue esp_name; use Brevo in new code
"sendinblue/inbound/",
SendinBlueInboundWebhookView.as_view(),
name="sendinblue_inbound_webhook",
),
path(
"sparkpost/inbound/",
SparkPostInboundWebhookView.as_view(),
name="sparkpost_inbound_webhook",
),
path(
"amazon_ses/tracking/",
AmazonSESTrackingWebhookView.as_view(),
name="amazon_ses_tracking_webhook",
),
path(
"brevo/tracking/",
BrevoTrackingWebhookView.as_view(),
name="brevo_tracking_webhook",
),
path(
"mailersend/tracking/",
MailerSendTrackingWebhookView.as_view(),
name="mailersend_tracking_webhook",
),
path(
"mailgun/tracking/",
MailgunTrackingWebhookView.as_view(),
name="mailgun_tracking_webhook",
),
path(
"mailjet/tracking/",
MailjetTrackingWebhookView.as_view(),
name="mailjet_tracking_webhook",
),
path(
"postal/tracking/",
PostalTrackingWebhookView.as_view(),
name="postal_tracking_webhook",
),
path(
"postmark/tracking/",
PostmarkTrackingWebhookView.as_view(),
name="postmark_tracking_webhook",
),
path(
"resend/tracking/",
ResendTrackingWebhookView.as_view(),
name="resend_tracking_webhook",
),
path(
"sendgrid/tracking/",
SendGridTrackingWebhookView.as_view(),
name="sendgrid_tracking_webhook",
),
path(
# Compatibility for old SendinBlue esp_name; use Brevo in new code
"sendinblue/tracking/",
SendinBlueTrackingWebhookView.as_view(),
name="sendinblue_tracking_webhook",
),
path(
"sparkpost/tracking/",
SparkPostTrackingWebhookView.as_view(),
name="sparkpost_tracking_webhook",
),
path(
"unisender_go/tracking/",
UnisenderGoTrackingWebhookView.as_view(),
name="unisender_go_tracking_webhook",
),
# Anymail uses a combined Mandrill webhook endpoint,
# to simplify Mandrill's key-validation scheme:
path("mandrill/", MandrillCombinedWebhookView.as_view(), name="mandrill_webhook"),
# This url is maintained for backwards compatibility with earlier Anymail releases:
path(
"mandrill/tracking/",
MandrillCombinedWebhookView.as_view(),
name="mandrill_tracking_webhook",
),
]