Did I find the right examples for you? yes no

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/d/j/django-rest-skeleton-HEAD/api/utils/fields.py   django-rest-skeleton(Download)
# -*- coding: utf-8 -*-
import shortuuid
 
from django_extensions.db.fields import UUIDField, UUIDVersionError
 
            return shortuuid.uuid()
        elif self.version == 2:
            raise UUIDVersionError("UUID version 2 is not supported.")
        elif self.version == 3:
            raise UUIDVersionError("UUID version 3 is not supported.")
        elif self.version == 5:
            return shortuuid.uuid(name=self.namespace)
        else:
            raise UUIDVersionError("UUID version %s is not valid." % self.version)