Skip to content
New issue

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

Adicionar suporte a outros engines #12

Open
alisonamerico opened this issue Nov 5, 2021 · 0 comments
Open

Adicionar suporte a outros engines #12

alisonamerico opened this issue Nov 5, 2021 · 0 comments

Comments

@alisonamerico
Copy link
Collaborator

Problema atual:
Permite usar o field JSONField apenas para os engines mysql e postgres.

if 'mysql' in settings.DATABASES['default']['ENGINE']:
    from jsonfield import JSONField
else:
    from django.contrib.postgres.fields import JSONField

Solução:
Irá permitir utilizar o field JSONField para outros engines, por exemplo, o postgis, sqlite, spatialite...

if 'postg' in settings.DATABASES['default']['ENGINE']: 
    from django.contrib.postgres.fields import JSONField
else:
    from jsonfield import JSONField
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant