django-naomi
raw JSON → 0.8 verified Fri May 01 auth: no python maintenance
Django email backend that captures outgoing emails and displays them in the browser for preview, instead of actually sending them. Current version 0.8, last updated in 2017, in maintenance mode.
pip install django-naomi Common errors
error ModuleNotFoundError: No module named 'django_naomi' ↓
cause Trying to import 'django_naomi' as the module name; correct module is 'naomi'.
fix
Change import to 'from naomi.backend import NaomiEmailBackend' or set EMAIL_BACKEND = 'naomi.backend.NaomiEmailBackend'.
error AttributeError: 'str' object has no attribute 'backend' ↓
cause Misconfigured EMAIL_BACKEND setting with wrong dotted path.
fix
Ensure EMAIL_BACKEND = 'naomi.backend.NaomiEmailBackend' is a string.
Warnings
gotcha The import module is 'naomi', not 'django_naomi' or 'django-naomi'. The package name on PyPI uses hyphens, but the Python module is 'naomi'. ↓
fix Use 'from naomi.backend import NaomiEmailBackend' or set EMAIL_BACKEND to 'naomi.backend.NaomiEmailBackend'.
deprecated This library is in maintenance mode; no updates since 2017. It may not work with Django 4.x+ without patches. ↓
fix Consider using django-mailer or django-email-bandit for more modern alternatives.
gotcha The preview URL defaults to '/__email__/' but may not be registered if URLconf is not configured. Check the docs for manual URL inclusion. ↓
fix Add path('__email__/', include('naomi.urls')) to your URLconf if automatic discovery fails.
Imports
- NaomiEmailBackend wrong
from django_naomi import ...correctfrom naomi.backend import NaomiEmailBackend
Quickstart
# settings.py
EMAIL_BACKEND = 'naomi.backend.NaomiEmailBackend'
# No further configuration needed; emails are captured in memory and viewed via /__email__/ endpoint