Mai Gillmann 4791d00a43 17.12
2019-12-17 14:09:10 +01:00

12 lines
252 B
Python

from django.db.models import DateTimeField, Func, UUIDField
class RandomUUID(Func):
template = 'GEN_RANDOM_UUID()'
output_field = UUIDField()
class TransactionNow(Func):
template = 'CURRENT_TIMESTAMP'
output_field = DateTimeField()