Notifications are short emails sent to users by Facebook or Twitter to inform users of some changes.
-django-email-notification allow you to send short email notifications to django registered users and also to users you only know the email about what is new or changed. And track their clicks.
+django-email-notification allows backoffice users to send short email notifications to django registered users or users you only know the email about what is new or changed from django's admin or a dedicated view. And then track their clicks.
'description': u"New products", # Human readable description
'long_description': u"Last products added to our site", # Long description
'class': 'project.application.models.Product', # path to the class model
- 'title_attr': 'product_description', # Model instance field to display in form
, can be a callable
+ 'title_attr': 'product_description', # Model instance field to display in form
'order_by': '-creation_date', # order to sort Model instances in form and email template
'manager': '', # manager to use if so
def save(self, *args, **kwargs):
super(NotificationFormAdmin, self).save(*args, **kwargs)
def save_model(self, request, obj, form, change):
super(NotificationAdmin, self).save_model(request, obj, form, change)
- if "save-and-send" in request.POST:
+ if 'save-and-send' in request.POST:
+ form.save_m2m() # slightly anticipate m2m saving
+ """Users who registered to notifications but are not Django users. Only email is required."""
registration_date = models.DateTimeField(auto_now_add=True, verbose_name=_(u"Registration date"))
email = models.EmailField(verbose_name=_(u"Email"))
first_name = models.CharField(max_length=70, blank=True, verbose_name=_(u"First name"))