Store contact form submissions in Wagtail admin
This commit is contained in:
@@ -1 +1,20 @@
|
||||
from mandelblog_content_guard.hooks import * # noqa: F401,F403
|
||||
|
||||
from wagtail.snippets.views.snippets import SnippetViewSet
|
||||
from wagtail.snippets.models import register_snippet
|
||||
|
||||
from mandelstudio.models import ContactMessage
|
||||
|
||||
|
||||
@register_snippet
|
||||
class ContactMessageViewSet(SnippetViewSet):
|
||||
model = ContactMessage
|
||||
icon = "mail"
|
||||
menu_label = "Contact messages"
|
||||
menu_order = 220
|
||||
add_to_admin_menu = True
|
||||
|
||||
list_display = ("created_at", "name", "email", "locale", "site")
|
||||
list_filter = ("locale", "site")
|
||||
search_fields = ("name", "email", "message", "phone_number")
|
||||
ordering = ("-created_at",)
|
||||
|
||||
Reference in New Issue
Block a user