[Fixed]-Setting random string as id

1👍

If you want to set a random string as a django object’s id, you should use the UUIDField

from the documentation:

A field for storing universally unique identifiers. Uses Python’s UUID class. When used on PostgreSQL, this stores in a uuid datatype, otherwise in a char(32).

Leave a comment