For the polls app I added a vote so I can limmit votes...
This is the model code and it is working fine.
Success.
class Vote(models.Model):
poll = models.ForeignKey(Poll,
edit_inline=models.TABULAR,
num_in_admin=3)
voter_ip = models.IPAddressField(core=True)
choice = models.ForeignKey(Choice,
edit_inline=models.TABULAR,
num_in_admin=3)
class Meta:
unique_together = (("poll",
"voter_ip"),)
def __str__(self):
return self.voter_ip
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|