I went through GenericRelation's today as I was harassed several times
to, and I found nothing that would help at all for what I'm trying to
accomplish.

Here are the updated models:

class Score(models.Model):
        content_type = models.ForeignKey(ContentType, db_index=True)
        object_id = models.PositiveIntegerField(db_index=True)

        score = models.IntegerField(default=0)

        class Meta:
                unique_together = (('content_type', 'object_id'),)
                verbose_name = _('score')
                verbose_name_plural = _('scores')

class Rating(models.Model):
        score = models.ForeignKey(Score, db_index=True)

        user = models.ForeignKey(UserExt, null=True, db_index=True)
        ip = models.IPAddressField()
        rating = models.SmallIntegerField(maxlength=1, choices=SCORE_CHOICES)
        post_date = models.DateTimeField(auto_now=True, editable=False)

        class Meta:
                unique_together = (('score', 'user'),)
                ordering = ['-post_date']
                verbose_name = _('rating')
                verbose_name_plural = _('ratings')


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to