Hi folks, On Sun, 2013-05-05 at 13:38 -0400, Rahul Sundaram wrote: > Thanks. You can drop a mail to upstream of django post office and > let > him know. I *think* it stores the email in the db by default based > on > the template but might be useful to confirm this. > > Rahul The package got approved and I've just finished pushing updates to bodhi. Yep, it does seem to make use of the db to store mails. The "installation" and "quick start" sections[1] detail how it's to be used: > Installation > ============ > > .. image:: https://travis-ci.org/ui/django-post_office.png?branch=master > > > * Install from PyPI (or you can `manually download it from PyPI <http://pypi.python.org/pypi/django-post_office>`_):: > > pip install django-post_office > So, install the rpm, in our case > > * Add ``post_office`` to your INSTALLED_APPS in django's ``settings.py``: > > .. code-block:: python > > INSTALLED_APPS = ( > # other apps > "post_office", > ) > > * Run ``syncdb``:: > > python manage.py syncdb > > * Set ``post_office.EmailBackend`` as your ``EMAIL_BACKEND`` in django's ``settings.py``:: > > EMAIL_BACKEND = 'post_office.EmailBackend' > > > Quickstart > ========== > > To get started, make sure you have Django's admin interface enabled. Create an > ``EmailTemplate`` instance via ``/admin`` and you can start sending emails. > > .. code-block:: python > > from post_office import mail > > mail.send( > ['recipient1@xxxxxxxxxxx', 'recipient2@xxxxxxxxxxx'], > 'from@xxxxxxxxxxx', > template='welcome_email', # Could be an EmailTemplate instance or name > context={'foo': 'bar'}, > ) > > The above command will put your email on the queue so you can use the > command in your webapp without slowing down the request/response cycle too much. > To actually send them out, run ``python manage.py send_queued_mail``. > You can schedule this management command to run regularly via cron:: > > * * * * * (/usr/bin/python manage.py send_queued_mail >> send_mail.log 2>&1) I can set up the cron job at the end, like I did earlier for askbot. I'm not sure how to do the other steps on the server (is root access required?). Could you folks tell me how to go about it, (or do it, if you have the cycles yourself ;) ) I'll go drop upstream a mail in the time being. On a related note, has anyone received any "accept answer reminders"? I was wondering how we'd test that. [1] https://pypi.python.org/pypi/django-post_office -- Thanks, Warm regards, Ankur: "FranciscoD" Please only print if necessary. Looking to contribute to Fedora? Look here: https://fedoraproject.org/wiki/Fedora_Join_SIG http://fedoraproject.org/wiki/User:Ankursinha http://ankursinha.in/blog
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________ infrastructure mailing list infrastructure@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/infrastructure