Django/docs/2.2.x/ modules/django/contrib/postgres/functions

来自菜鸟教程
跳转至:导航、​搜索

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()