ucb-rit / coldfront

HPC Resource Allocation System
https://coldfront.readthedocs.io
GNU General Public License v3.0
3 stars 3 forks source link

Integrate django-mail-panel to view rendered email directly in browser #359

Open matthew-li opened 2 years ago

matthew-li commented 2 years ago

In order to easily develop HTML emails, we should be able to see them fully-rendered, but:

Investigate using django-mail-panel to send email to a tab in the Django Debug Toolbar, to be viewed directly in the UI.

matthew-li commented 2 years ago

Some of the initial setup is in branch issue_359 (diff).

Non-committed changes (stored in my dev_settings.py) include the below. Some of this will be necessary:

INTERNAL_IPS = ['10.0.2.2',]
DEBUG_TOOLBAR_PANELS = [
    'debug_toolbar.panels.history.HistoryPanel',
    'debug_toolbar.panels.versions.VersionsPanel',
    'debug_toolbar.panels.timer.TimerPanel',
    'debug_toolbar.panels.settings.SettingsPanel',
    'debug_toolbar.panels.headers.HeadersPanel',
    'debug_toolbar.panels.request.RequestPanel',
    'debug_toolbar.panels.sql.SQLPanel',
    'debug_toolbar.panels.staticfiles.StaticFilesPanel',
    'debug_toolbar.panels.templates.TemplatesPanel',
    'debug_toolbar.panels.cache.CachePanel',
    'debug_toolbar.panels.signals.SignalsPanel',
    'debug_toolbar.panels.logging.LoggingPanel',
    'debug_toolbar.panels.redirects.RedirectsPanel',
    'debug_toolbar.panels.profiling.ProfilingPanel',
    'mail_panel.panels.MailToolbarPanel',
]
#
# def show_toolbar(request):
#     return True
#
# DEBUG_TOOLBAR_CONFIG = {
#     'SHOW_TOOLBAR_CALLBACK': show_toolbar,
# }

MAIL_TOOLBAR_TTL = 86400

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
    }
}