Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure multiple campaign backends #61

Open
mgax opened this issue Jul 30, 2024 · 0 comments
Open

Configure multiple campaign backends #61

mgax opened this issue Jul 30, 2024 · 0 comments

Comments

@mgax
Copy link
Member

mgax commented Jul 30, 2024

Use a dictionary à la Django's database / cache settings (and Wagtail's search backends) for this e.g.

WAGTAIL_NEWSLETTER_BACKENDS = {
    "default": {
        "BACKEND": "wagtail_newsletter.campaign_backends.mailchimp.MailchimpCampaignBackend",
        "API_KEY": "...",
    },
    "otherservice": {
        "BACKEND": "someotherservice.backends.SomeOtherServiceCampaignBackend",
        "APP_ID": "...",
        "SECRET_KEY": "...",
        # or maybe wrap the credentials inside an `OPTIONS` key
    }
}

Different models can use different backends (or maybe you can select which service to use in the newsletter panel). It would also allow passing other options which may be backend-specific without having to define a top-level setting for each option.

#50 (comment)

@mgax mgax mentioned this issue Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant