I have a model called ColaNotificaciones.
class ColaNotificaciones(models.Model):
class Meta:
unique_together = (('remitente', 'destinatario', 'asunto','producto'),)
remitente = models.CharField(max_length=20)
destinatario = models.CharField(max_length=20)
asunto = models.CharField(max_length=2)
is_email = models.BooleanField(default=False)
is_notificacion = models.BooleanField(default = False)
f_publi = models.DateTimeField(auto_now_add = True)
producto = models.IntegerField(default = None)
From this filter model, whatever is_email = False.
Once I get the queryset I want to filter again by product, to get a new queryset in which all the notifications of the same product come out, to generate an email in which you know how many notifications you have and which senders have notified.