Opened 5 years ago

Closed 5 years ago

#15065 closed (invalid)

Installing django.contrib.gis causes all configured databases to use spatial DB engine

Reported by: clay Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords: postgis
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When using multiple databases, it is sometimes desirable to configure some as spatial databases (e.g., using a django.contrib.gis.db.backends.* engine), while configuring others as non-spatial (e.g., using the postgresql_psycopg2 engine). However, if 'django.contrib.gis' is in INSTALLED_APPS, django/db/__init__.py subversively changes all configured non-spatial database engines to their spatial counterparts.

Change History (1)

comment:1 Changed 5 years ago by clay

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

User error: we were using the short form engine (postgresql_psycopg2) instead of the long form (django.db.backends.postgresql_psycopg2) in our settings module. Changing that to the long form allows us to use mixed spatial and non-spatial dbs.

Note: See TracTickets for help on using tickets.
Back to Top