The unique_together attribute of the Meta class of your model is what you are looking for:
class Meta:
unique_together = ('poll', 'user_id')
Check django docs for more information.
The unique_together attribute of the Meta class of your model is what you are looking for:
class Meta:
unique_together = ('poll', 'user_id')
Check django docs for more information.