use geodjango
This commit is contained in:
parent
eb37ffef5a
commit
1fa2e510d2
1 changed files with 4 additions and 2 deletions
|
@ -43,10 +43,10 @@ else:
|
|||
debug_fallback = "runserver" in sys.argv
|
||||
DEBUG = config.getboolean('django', 'debug', fallback=debug_fallback)
|
||||
|
||||
db_backend = config.get('database', 'backend', fallback='sqlite3')
|
||||
db_backend = config.get('database', 'backend', fallback='spatialite')
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.' + db_backend,
|
||||
'ENGINE': 'django.contrib.gis.db.backends.' + db_backend,
|
||||
'NAME': config.get('database', 'name', fallback=os.path.join(DATA_DIR, 'db.sqlite3')),
|
||||
'USER': config.get('database', 'user', fallback=''),
|
||||
'PASSWORD': config.get('database', 'password', fallback=''),
|
||||
|
@ -55,6 +55,7 @@ DATABASES = {
|
|||
'CONN_MAX_AGE': 0 if db_backend == 'sqlite3' else 120
|
||||
}
|
||||
}
|
||||
SPATIALITE_LIBRARY_PATH = 'mod_spatialite'
|
||||
|
||||
STATIC_URL = config.get('urls', 'static', fallback='/static/')
|
||||
|
||||
|
@ -102,6 +103,7 @@ INSTALLED_APPS = [
|
|||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.gis',
|
||||
'compressor',
|
||||
'bootstrap3',
|
||||
'c3nav.control',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue