This commit is contained in:
Kuzma Leshakov 2019-02-22 14:38:12 +03:00
parent 0a2cff5c12
commit cb91971fd9
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ Currently the following field types are supported:
| ------------------ | ---------- | ------------------- | ----------------------------------------------------- | ------------------ | ---------- | ------------------- | -----------------------------------------------------
| StringField | String | unicode | Encoded as UTF-8 when written to ClickHouse | StringField | String | unicode | Encoded as UTF-8 when written to ClickHouse
| FixedStringField | String | unicode | Encoded as UTF-8 when written to ClickHouse | FixedStringField | String | unicode | Encoded as UTF-8 when written to ClickHouse
| DateField | Date | datetime.date | Range 1970-01-01 to 2038-01-19 | DateField | Date | datetime.date | Range 1970-01-01 to 2105-12-31
| DateTimeField | DateTime | datetime.datetime | Minimal value is 1970-01-01 00:00:00; Always in UTC | DateTimeField | DateTime | datetime.datetime | Minimal value is 1970-01-01 00:00:00; Always in UTC
| Int8Field | Int8 | int | Range -128 to 127 | Int8Field | Int8 | int | Range -128 to 127
| Int16Field | Int16 | int | Range -32768 to 32767 | Int16Field | Int16 | int | Range -32768 to 32767

View File

@ -89,7 +89,7 @@ When values are assigned to model fields, they are immediately converted to thei
>>> suzy.birthday = 0.5 >>> suzy.birthday = 0.5
ValueError: Invalid value for DateField - 0.5 ValueError: Invalid value for DateField - 0.5
>>> suzy.birthday = '1922-05-31' >>> suzy.birthday = '1922-05-31'
ValueError: DateField out of range - 1922-05-31 is not between 1970-01-01 and 2038-01-19 ValueError: DateField out of range - 1922-05-31 is not between 1970-01-01 and 2105-12-31
Inserting to the Database Inserting to the Database
------------------------- -------------------------

View File

@ -131,7 +131,7 @@ class FixedStringField(StringField):
class DateField(Field): class DateField(Field):
min_value = datetime.date(1970, 1, 1) min_value = datetime.date(1970, 1, 1)
max_value = datetime.date(2038, 1, 19) max_value = datetime.date(2105, 12, 31)
class_default = min_value class_default = min_value
db_type = 'Date' db_type = 'Date'