Commits

Kirill Simonov  committed 2d9b0b6

tweak.django: recognize spatial backends.

  • Participants
  • Parent commits 3ca89a0

Comments (0)

Files changed (1)

File src/htsql/tweak/django/__init__.py

         engine = {
                 'django.db.backends.postgresql_psycopg2': 'pgsql',
                 'django.db.backends.postgresql': 'pgsql',
+                'django.contrib.gis.db.backends.postgis': 'pgsql',
                 'django.db.backends.mysql': 'mysql',
+                'django.contrib.gis.db.backends.mysql': 'mysql',
                 'django.db.backends.sqlite3': 'sqlite',
+                'django.contrib.gis.db.backends.spatialite': 'sqlite',
                 'django.db.backends.oracle': 'oracle',
+                'django.contrib.gis.db.backends.oracle': 'oracle',
         }.get(engine, engine)
         username = settings.DATABASES[DEFAULT_DB_ALIAS]['USER']
         if not username: