def convert_StringProperty(model, prop, kwargs): """Returns a form field for a ``db.StringProperty``.""" kwargs['validators'].append(validators.length(max=500)) if not prop._repeated: return get_TextField(kwargs) else: return StringListPropertyField(**kwargs)
def convert_StringListProperty(model, prop, kwargs): """Returns a form field for a ``db.StringListProperty``.""" return StringListPropertyField(**kwargs)
def convert_StringProperty(self, model, prop, kwargs): """Returns a form field for a ``ndb.StringProperty``.""" if prop._repeated: return StringListPropertyField(**kwargs) kwargs["validators"].append(validators.length(max=500)) return get_TextField(kwargs)