Sérialiseur DRF unique ensemble
class SomeSerializer(serializers.ModelSerializer):
class Meta:
model = Some
fields = ('field1', 'field2')
validators = [
serializers.UniqueTogetherValidator(
queryset=model.objects.all(),
fields=('field1', 'field2'),
message='Some custom message.'
)
]
DiceNameIsMy