No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

datetime.py 585B

12345678910111213141516
  1. # -*- coding: utf-8 -*-
  2. from ..data_field import DataField
  3. class DataHandler(DataField):
  4. help = 'A datetime field. Take two boolean options now_on_update and now_on_create'
  5. ## @brief A datetime field
  6. # @param now_on_update bool : If true, the date is set to NOW on update
  7. # @param now_on_create bool : If true, the date is set to NEW on creation
  8. # @param **kwargs
  9. def __init__(self, now_on_update=False, now_on_create=False, **kwargs):
  10. self.now_on_update = now_on_update
  11. self.now_on_create = now_on_create
  12. super().__init__(**kwargs)