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 619B

1234567891011121314151617
  1. #-*- coding: utf-8 -*-
  2. from .generic import SingleValueFieldType
  3. class EmFieldType(SingleValueFieldType):
  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(EmFieldType, self).__init__(**kwargs)