django-celery-email 0.1.1
Django email backend for celery.
Latest Version: 1.0.3
A Django 1.2+ email backend that uses a Celery queue for out-of-band sending of the messages.
Using django-celery-email
To enable django-celery-email for your project you need to add djcelery_email to INSTALLED_APPS:
INSTALLED_APPS += ("djcelery_email",)
You must then set django-celery-email as your EMAIL_BACKEND:
EMAIL_BACKEND = 'djcelery_email.backends.CeleryEmailBackend'
By default django-celery-email will use Django's builtin SMTP email backend for the actual sending of the mail. If you'd like to use another backend, you may set it in CELERY_EMAIL_BACKEND just like you would normally have set EMAIL_BACKEND before you were using Celery. In fact, the normal installation procedure will most likely be to get your email working using only Django, then change EMAIL_BACKEND to CELERY_EMAIL_BACKEND, and then add the new EMAIL_BACKEND setting from above.
If you need to set any of the settings (attributes) you'd normally be able to set on a Celery Task class had you written it yourself, you may specify them in a dict in the CELERY_EMAIL_TASK_CONFIG setting:
CELERY_EMAIL_TASK_CONFIG = {
'queue' : 'email',
'rate_limit' : '50/m',
...
}
After this setup is complete, and you have a working Celery install, sending email will work exactly like it did before, except that the sending will be handled by your Celery workers.
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| django-celery-email-0.1.1.tar.gz (md5) | Source | 2010-08-01 | 3KB | 5853 | |
- Author: Paul McLanahan
- Home Page: http://bitbucket.org/pmclanahan/django-celery-email
- License: BSD
- Platform: any
-
Categories
- Development Status :: 4 - Beta
- Framework :: Django
- Intended Audience :: Developers
- License :: OSI Approved :: BSD License
- Operating System :: OS Independent
- Operating System :: POSIX
- Programming Language :: Python
- Topic :: Communications
- Topic :: Communications :: Email
- Topic :: Software Development :: Libraries :: Python Modules
- Topic :: System :: Distributed Computing
- Package Index Owner: pmclanahan
- DOAP record: django-celery-email-0.1.1.xml
