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.

format.py 717B

123456789101112131415161718
  1. # -*- coding: utf-8 -*-
  2. import warnings
  3. from .varchar import EmDataField as VarcharDataField
  4. class EmDataField(VarcharDataField):
  5. help = 'Automatic string field, designed to use the str % operator to build its content'
  6. ## @brief Build its content with a field list and a format string
  7. # @param format_string str
  8. # @param max_length int : the maximum length of the handled value
  9. # @param field_list list : List of field to use
  10. # @param **kwargs
  11. def __init__(self, format_string, field_list, max_length, **kwargs):
  12. self._field_list = field_list
  13. self._format_string = format_string
  14. super(self.__class__, self).__init__(internal='automatic', max_length=max_length)