django.contrib.postgres.functions 源代码
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()