{{{
ValueError: Cannot serialize: UUID('613d3463-b9d6-4bf1-9b62-1e31598b2700')
There are some values Django cannot serialize into migration files.
For more, see https://docs.djangoproject.com/en/1.8/topics/migrations
/#migration-serializing
}}}
Using the following in models.py
{{{
from uuid import uuid4
uuid = models.UUIDField(primary_key=True, default=uuid4(), editable=False)
}}}
I managed to make this work by using default=uuid4().hex but the value in
the migration file is that generated value
--
Ticket URL: <https://code.djangoproject.com/ticket/24631>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0
Comment:
Re-read the documentation:
https://docs.djangoproject.com/en/1.8/ref/models/fields/#uuidfield
`Note that a callable (with the parentheses omitted) is passed to default,
not an instance of UUID.`
--
Ticket URL: <https://code.djangoproject.com/ticket/24631#comment:1>