Answer the question
In order to leave comments, you need to log in
How to properly generate uuid in Django?
Hi everybody!
One of the models has a field of type UUIDField:
global_id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)
Answer the question
In order to leave comments, you need to log in
2. Motivation
One of the main reasons for using UUIDs is that no centralized
authority is required to administer them (although one format uses
IEEE 802 node identifiers, others do not). As a result, generation
on demand can be completely automated, and used for a variety of
purposes. The UUID generation algorithm described here supports very
high allocation rates of up to <b>10 million per second per machine</b> if
necessary, so that they could even be used as transaction IDs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question