labelbase/django/attachments/tests/testapp/models.py
2024-04-14 01:59:27 +02:00

23 lines
501 B
Python

import uuid
from django.db import models
class TestModel(models.Model):
title = models.CharField(max_length=100)
class Meta:
db_table = "testapp_testmodel"
def get_absolute_url(self):
return "/"
class ModelWithUuidPk(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
title = models.CharField(max_length=100)
class Meta:
db_table = "testapp_uuid4_model"
def get_absolute_url(self):
return "/"