rutube / django_vertica_backend

8 stars 11 forks source link

Django import problems in vertica.base #12

Open shahar4499 opened 7 years ago

shahar4499 commented 7 years ago

I'm having problems trying to make the package work with Django 1.10.4. In the vertica.base module, there are some imports that do not work:

from django.db.backends.creation import BaseDatabaseCreation
from django.db.backends import BaseDatabaseWrapper, BaseDatabaseFeatures, BaseDatabaseValidation, \
    BaseDatabaseOperations, BaseDatabaseClient, BaseDatabaseIntrospection

That's because all of these objects are not imported from the correct modules. I've managed to get the imports right for django 1.10.4.

Should I make a pull request? Or is this backend meant to work with lower versions of django?

tumb1er commented 7 years ago

Now it works with Django-1.6, without 1.7+ support (and any plans for it in nearest future). If you want, you can add 1.10 support freely. May be we'll add intermediate versions support with version upgrade. Two advices:

if django.__version__ < (1, 10, 0):
    from django.db.backends.base.creation import BaseDatabaseCreation
else:
    from django.db.backends.creation import BaseDatabaseCreation