Answers for "django model UUID field"

0

django model UUID field

import uuid
from django.db import models

class MyUUIDModel(models.Model):
    id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
    # other fields
Posted by: Guest on May-04-2021

Python Answers by Framework

Browse Popular Code Answers by Language