Hi, I am new to geodjango,
my setting look like this:
DATABASES = {
"default" : {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'dbname', # Or path to database file if using sqlite3.
'USER': 'django', # Not used with sqlite3.
'PASSWORD': 'pass', # Not used with sqlite3.
'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.gis',
"app.core",
)
and I have a model like this:
class Location(models.Model):
author = models.ForeignKey(UserProfile)
loc = geomodels.PointField()
objects = geomodels.GeoManager()
But the problem is that it wont syncdb:
AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'
But if I remove the model from installed_apps everything is which is weird because there is also "django.contrib.gis" but that seems to be ok..
the db was created using command:
postgres@rewitaqia:~$ createdb -U postgres -T template_postgis -O django db_name
Please could you help me?