Browse Source

Adicionado suporte a migrations a campo personalizado

producao
Marcio Mazza 10 years ago
parent
commit
8d7d4a468b
  1. 4
      sigi/apps/utils/__init__.py

4
sigi/apps/utils/__init__.py

@ -20,6 +20,10 @@ class SearchField(models.TextField):
kwargs['editable'] = False kwargs['editable'] = False
super(self.__class__, self).__init__(*args, **kwargs) super(self.__class__, self).__init__(*args, **kwargs)
def deconstruct(self):
name, path, args, kwargs = super(SearchField, self).deconstruct()
kwargs['field_names'] = self.field_names
return name, path, args, kwargs
def to_ascii(txt, codif='utf-8'): def to_ascii(txt, codif='utf-8'):
if not isinstance(txt, basestring): if not isinstance(txt, basestring):

Loading…
Cancel
Save