API: Add endpoints for automated email rules (#2178)

Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
Julia Luna
2021-11-03 11:49:01 +01:00
committed by GitHub
parent 60be99fbb2
commit f8927396d3
11 changed files with 697 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ from pretix.base.email import get_email_context
from pretix.base.models import (
Event, InvoiceAddress, Item, Order, OrderPosition, SubEvent,
)
from pretix.base.models.base import LoggingMixin
from pretix.base.services.mail import SendMailException
@@ -164,7 +165,7 @@ class ScheduledMail(models.Model):
self.last_successful_order_id = o.pk
class Rule(models.Model):
class Rule(models.Model, LoggingMixin):
CUSTOMERS = "orders"
ATTENDEES = "attendees"
BOTH = "both"