Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'module' object has no attribute 'GeoSQLCompiler'

I am new to geodjango. I am using django-1.4.5 and my database settings,

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql_psycopg2", # Add "postgresql_psycopg2", "postgresql", "mysql", "sqlite3" or "oracle".
        "NAME": "mydb",                       # Or path to database file if using sqlite3.
        "USER": "postgres",                             # Not used with sqlite3.
        "PASSWORD": "test",                         # Not used with sqlite3.
        "HOST": "localhost",                             # Set to empty string for localhost. Not used with sqlite3.
        "PORT": "",                             # Set to empty string for default. Not used with sqlite3.
    }
}

And i got the error 'module' object has no attribute 'GeoSQLCompiler' Please solve my problem.

like image 770
dhana Avatar asked Oct 07 '13 13:10

dhana


1 Answers

Replace:

'ENGINE': 'django.db.backends.postgresql_psycopg2'

with

'ENGINE': 'django.contrib.gis.db.backends.postgis'
like image 170
mrvol Avatar answered Sep 18 '22 18:09

mrvol