Implement Web Assets' theme system and selection, and add 'light' theme #118
@ -10,7 +10,6 @@ import django.core.mail
|
|||||||
|
|
||||||
from emails.models import Email
|
from emails.models import Email
|
||||||
from emails.util import construct_email
|
from emails.util import construct_email
|
||||||
from common.tests.factories.notifications import construct_fake_notifications
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
User = get_user_model()
|
User = get_user_model()
|
||||||
@ -112,13 +111,16 @@ class EmailPreviewAdmin(NoAddDeleteMixin, EmailAdmin):
|
|||||||
def _get_emails_with_fake_context(self, request):
|
def _get_emails_with_fake_context(self, request):
|
||||||
email_with_fake_context = {'feedback': {}}
|
email_with_fake_context = {'feedback': {}}
|
||||||
|
|
||||||
fake_notifications = construct_fake_notifications()
|
if settings.DEBUG:
|
||||||
for fake_notification in fake_notifications:
|
from common.tests.factories.notifications import construct_fake_notifications
|
||||||
mail_name = fake_notification.original_template_name
|
|
||||||
email_with_fake_context[mail_name] = {
|
fake_notifications = construct_fake_notifications()
|
||||||
'template': fake_notification.template_name,
|
for fake_notification in fake_notifications:
|
||||||
**fake_notification.get_template_context(),
|
mail_name = fake_notification.original_template_name
|
||||||
}
|
email_with_fake_context[mail_name] = {
|
||||||
|
'template': fake_notification.template_name,
|
||||||
|
**fake_notification.get_template_context(),
|
||||||
|
}
|
||||||
return email_with_fake_context
|
return email_with_fake_context
|
||||||
|
|
||||||
def _get_emails_list(self, request):
|
def _get_emails_list(self, request):
|
||||||
|
Loading…
Reference in New Issue
Block a user