Skip to content

Create New Email From Django Admin #454

@MrAlexWinkler

Description

@MrAlexWinkler

I'd really appreciate if there was a way to create a new email (not template) from the django admin. So one could send out a new newsletter at any time. Just something super simple to not have to use code.

When trying to set this up I get error that Email model is already registered in admin:


from django import forms
from django.contrib import admin
from post_office.models import Email
from post_office.admin import EmailAdmin

class CustomEmailForm(forms.ModelForm):

    class Meta:
        model = Email
        fields = '__all__'

class CustomEmailAdmin(EmailAdmin):
    form = CustomEmailForm

admin.site.unregister(Email)
admin.site.register(Email, CustomEmailAdmin)

In essence; with django post_office how to send emails manually from admin website and not with application logic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions