(self, primary_key=True, version=4, editable=False, *args, **kwargs)
Parameters
        ----------
        primary_key : bool
            If True, this field is the primary key for the model.
        version : int
            An integer that set default UUID version.
        editable : bool
            If False, the field will not be displayed in the admin or any other ModelForm,
            default is false.

        Raises
        ------
        ValidationError
            UUID version 2 is not supported.
Parameters
        ----------
        primary_key : bool
            If True, this field is the primary key for the model.
        version : int
            An integer that set default UUID version.
        editable : bool
            If False, the field will not be displayed in the admin or any other ModelForm,
            default is false.
Parameters ---------- primary_key : bool If True this field is the primary key for the model . version : int An integer that set default UUID version . editable : bool If False the field will not be displayed in the admin or any other ModelForm default is false .
def __init__(self, primary_key=True, version=4, editable=False, *args, **kwargs):
        """
        Parameters
        ----------
        primary_key : bool
            If True, this field is the primary key for the model.
        version : int
            An integer that set default UUID version.
        editable : bool
            If False, the field will not be displayed in the admin or any other ModelForm,
            default is false.

        Raises
        ------
        ValidationError
            UUID version 2 is not supported.
        """

        if version == 2:
            raise ValidationError(
                'UUID version 2 is not supported.')

        if version < 1 or version > 5:
            raise ValidationError(
                'UUID version is not valid.')

        if version == 1:
            default = uuid.uuid1
        elif version == 3:
            default = uuid.uuid3
        elif version == 4:
            default = uuid.uuid4
        elif version == 5:
            default = uuid.uuid5

        kwargs.setdefault('primary_key', primary_key)
        kwargs.setdefault('editable', editable)
        kwargs.setdefault('default', default)
        super().__init__(*args, **kwargs)
def __init__ ( self , primary_key = True , version = 4 , editable = False , * args , * * kwargs ) : if version == 2 : raise ValidationError ( 'UUID version 2 is not supported.' ) if version < 1 or version > 5 : raise ValidationError ( 'UUID version is not valid.' ) if version == 1 : default = uuid . uuid1 elif version == 3 : default = uuid . uuid3 elif version == 4 : default = uuid . uuid4 elif version == 5 : default = uuid . uuid5 kwargs . setdefault ( 'primary_key' , primary_key ) kwargs . setdefault ( 'editable' , editable ) kwargs . setdefault ( 'default' , default ) super ( ) . __init__ ( * args , * * kwargs )