We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In our development we are using django==1.8.2 and we have this strange problem on initial migrations. To be more specific the fields.py:
fields.py
class LanguagesField(TextArrayField): def __init__(self, *args, **kwargs): kwargs.update({ 'verbose_name': _('языковые версии'), 'choices': settings.LANGUAGES, 'default': ('en',), 'db_index': True }) super(LanguagesField, self).__init__(*args, **kwargs) def formfield(self, **kwargs): kwargs['widget'] = forms.CheckboxSelectMultiple(attrs={'class': 'uioff'}) kwargs['required'] = True return super(LanguagesField, self).formfield(**kwargs)
In models.py:
models.py
langs = LanguagesField()
The initial migration:
fields = [ ... ('langs', multilanguages.fields.LanguagesField(default=('en',), choices=[(b'en', '\u0410\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439'), (b'ru', '\u0420\u0443\u0441\u0441\u043a\u0438\u0439'), (b'tr', '\u0422\u0443\u0440\u0435\u0446\u043a\u0438\u0439')], dbtype='text', verbose_name='\u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438', db_index=True)), ... ]
And error on ./manage.py migrate
./manage.py migrate
django.db.utils.ProgrammingError: operator class "text_pattern_ops" does not accept data type text[]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In our development we are using django==1.8.2 and we have this strange problem on initial migrations. To be more specific the
fields.py
:In
models.py
:The initial migration:
And error on
./manage.py migrate
The text was updated successfully, but these errors were encountered: