(self, **kwargs)
| 826 | } |
| 827 | |
| 828 | def __init__(self, **kwargs): |
| 829 | self.uuid_format = kwargs.pop('format', 'hex_verbose') |
| 830 | if self.uuid_format not in self.valid_formats: |
| 831 | raise ValueError( |
| 832 | 'Invalid format for uuid representation. ' |
| 833 | 'Must be one of "{}"'.format('", "'.join(self.valid_formats)) |
| 834 | ) |
| 835 | super().__init__(**kwargs) |
| 836 | |
| 837 | def to_internal_value(self, data): |
| 838 | if not isinstance(data, uuid.UUID): |