English 中文(简体)
django-notification & django-mailer. 他们如何共同工作?
原标题:django-notification & django-mailer... how do they work together?

I m looking at implementing some email notification in my app. Django-notification or Django-mailer both look appropriate.
I m reading through the docs and trying to figure out how they work together.

from the docs: http://code.google.com/p/django-mailer/#Sample_Use_Cases

django-mailer不应管理实际订阅活动。 考虑“对电离板的新答复”使用案例。 整个网站需要不断跟踪用户对哪些用户表示认可,然后当线更新时,将要求django-mailer向该用户名单发出同样的信息。 但是,django-notification > 用户应当随时了解哪些用户赞同这些用户的阅读和类似的使用案例。

Given this scenario, I don t understand the last line. How do you use django-notification to keep track of what users are subscribed to what threads?
the api for django-notification
https://github.com/jtauber/django-notification/blob/master/docs/usage.txt

makes it look like you can use django-notification to
- define notification types
- do actions like send_now, queue and send

but there is nothing here that indicates how i would subscribe users in the use case described.
Second, in the scenario described, how does django mailer know what to send? does it reuse the definitions from the notification app? it looks like both mailer and notification imlpement "send" functionality....

谁能帮助我更好地理解这一点?

问题回答

Django notification is directed at allowing the users to determine how they are notified of different types of "events". For example when a new user joins the site a notification could be generated by the "registration" app and sent to all users of the site. Then depending on each users notification setting(which users can change) the notification system would choose how to deliver that notice to a particular user. It could be delivered via email, sms(requires extension of the notification system), or just on the site itself. Typically, when syncdb is run the various apps (like the registration app) create the unique notice types they will use. For example registration could have both a "new user" and a "user deactivation" notice types. Then a user on their notification settings page can set whether they want to receive that type of notice via email (or sms perhaps).

django-mailer只是发送电子邮件的系统。 任何东西都可以使用。 django-notification app可将其用于发送电子邮件,或“登记”备份可用于发送确认函(不会通过通知系统)。

In my view if you had a forum app, it would keep track of which users are subscribed to which forums and would generate notices accordingly. A comment app. would keep track of which users commented on which items and generate notices to users accordingly. So to reiterate. The "individual" apps generate notices. The notification app sends out the notices depending on individuals settings. The mailer handles the sending of email (which may or may not be generated by the notification app).





相关问题
How to get two random records with Django

How do I get two distinct random records using Django? I ve seen questions about how to get one but I need to get two random records and they must differ.

Moving (very old) Zope/Plone Site to Django

I am ask to move data from a (now offline) site driven by Plone to a new Django site. These are the version informations I have: Zope Version (unreleased version, python 2.1.3 ) Python Version 2.1....

Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

Flexible pagination in Django

I d like to implement pagination such that I can allow the user to choose the number of records per page such as 10, 25, 50 etc. How should I go about this? Is there an app I can add onto my project ...

is it convenient to urlencode all next parameters? - django

While writing code, it is pretty common to request a page with an appended "next" query string argument. For instance, in the following template code next points back to the page the user is on: &...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

热门标签