Hi Nicole,
Override the Friendship model's 'save' method to test the unique
combination of (initiator, recipient).
Regards,
On 29 January 2015 at 08:27, Nicole Harris
wrote:
> Hi All,
>
> I have a model called 'Friendship' that includes two foreign keys to
> User. One is the 'initiator' of th
Hi All,
I have a model called 'Friendship' that includes two foreign keys to User.
One is the 'initiator' of the Friendship, the other the 'recipient'.
I want to make sure the Friendship only exists once regardless of who is
the recipient and who is the initiator.
Any thoughts on the best way
2 matches
Mail list logo