bornhack-website/bornhack/utils.py

23 lines
417 B
Python
Raw Normal View History

2015-10-03 01:07:05 +00:00
import uuid
from django.db import models
class CreatedUpdatedModel(models.Model):
class Meta:
abstract = True
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
class UUIDModel(models.Model):
class Meta:
abstract = True
uuid = models.UUIDField(
primary_key=True,
default=uuid.uuid4,
editable=False,
)