class documentation

class UniqueTogetherValidator: (source)

View In Hierarchy

Validator that corresponds to `unique_together = (...)` on a model class. Should be applied to the serializer class, not to an individual field.

Method __call__ Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method enforce_required_fields The `UniqueTogetherValidator` always forces an implied 'required' state on the fields it applies to.
Method exclude_current_instance If an instance is being updated, then do not include that instance itself as a uniqueness conflict.
Method filter_queryset Filter the queryset to all instances matching the given attributes.
Class Variable missing_message Undocumented
Class Variable requires_context Undocumented
Instance Variable fields Undocumented
Instance Variable message Undocumented
Instance Variable queryset Undocumented
def __call__(self, attrs, serializer): (source)

Undocumented

def __init__(self, queryset, fields, message=None): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def enforce_required_fields(self, attrs, serializer): (source)

The `UniqueTogetherValidator` always forces an implied 'required' state on the fields it applies to.

def exclude_current_instance(self, attrs, queryset, instance): (source)

If an instance is being updated, then do not include that instance itself as a uniqueness conflict.

def filter_queryset(self, attrs, queryset, serializer): (source)

Filter the queryset to all instances matching the given attributes.

missing_message = (source)

Undocumented

requires_context: bool = (source)

Undocumented

Undocumented

Undocumented

queryset = (source)

Undocumented