8
8
from rest_framework .response import Response
9
9
10
10
from core .api import permissions
11
- from core .api .serializers import EmailTemplateLightSerializer , EmailTemplateSerializer
11
+ from core .api .serializers import EmailTemplateSerializer
12
12
from core .models import EmailTemplate , Mailbox , MailDomain , TemplateTypeChoices
13
13
14
14
@@ -75,18 +75,7 @@ def get_queryset(self):
75
75
return queryset .distinct ()
76
76
77
77
78
- @extend_schema (
79
- responses = {
80
- 200 : EmailTemplateLightSerializer (many = True ),
81
- },
82
- description = "Get a list of email templates for dropdowns and lists." ,
83
- )
84
- @action (detail = False , methods = ["get" ], url_path = "light" )
85
- def light_list (self , request ):
86
- """Get a light list of email templates."""
87
- queryset = self .filter_queryset (self .get_queryset ())
88
- serializer = EmailTemplateLightSerializer (queryset , many = True )
89
- return Response (serializer .data )
78
+
90
79
91
80
@extend_schema (
92
81
responses = {
@@ -108,6 +97,7 @@ def light_list(self, request):
108
97
def render_template (self , request , pk = None ): # pylint: disable=unused-argument
109
98
"""Render a template with the provided context."""
110
99
template = self .get_object ()
100
+ # context -> mailbox uuid (+ fullname of user identified)
111
101
context = request .query_params .get ("context" , {})
112
102
113
103
try :
0 commit comments