[Answer]-Relationships โ€“ Rating one per user per address

1๐Ÿ‘

โœ…

you can add a unique_together constraint to make it so every address and user combination has to be unique

https://docs.djangoproject.com/en/dev/ref/models/options/#unique-together

unique_together = ('buildingaddress', 'author')

๐Ÿ‘คdm03514

Leave a comment