示例#1
0
文件: fields.py 项目: 0077cc/NewsBlur
 def to_python(self, value):
     value = super(TimeZoneField, self).to_python(value)
     if value is None:
         return None # null=True
     return coerce_timezone_value(value)
示例#2
0
 def to_python(self, value):
     value = super(TimeZoneField, self).to_python(value)
     if value is None:
         return None  # null=True
     return coerce_timezone_value(value)
示例#3
0
 def from_db_value(self, value, expression, connection):
     if value is None:
         return None
     return coerce_timezone_value(value)
示例#4
0
 def from_db_value(self, value, expression, connection, context):
     value = super(TimeZoneField, self).to_python(value)
     if value is None:
         return None  # null=True
     return coerce_timezone_value(value)