mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Django can handle both strings and integers, but typeshed expects the default value to match the mapping's value type.
35 lines
832 B
Python
35 lines
832 B
Python
import os
|
|
|
|
INSTALLED_APPS = (
|
|
'model_utils',
|
|
'tests',
|
|
)
|
|
|
|
if os.environ.get('SQLITE'):
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
},
|
|
}
|
|
else:
|
|
DATABASES = {
|
|
"default": {
|
|
"ENGINE": "django.db.backends.postgresql",
|
|
"NAME": os.environ.get("POSTGRES_DB", "modelutils"),
|
|
"USER": os.environ.get("POSTGRES_USER", 'postgres'),
|
|
"PASSWORD": os.environ.get("POSTGRES_PASSWORD", ""),
|
|
"HOST": os.environ.get("POSTGRES_HOST", "localhost"),
|
|
"PORT": os.environ.get("POSTGRES_PORT", "5432")
|
|
},
|
|
}
|
|
SECRET_KEY = 'dummy'
|
|
|
|
CACHES = {
|
|
'default': {
|
|
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
|
|
}
|
|
}
|
|
|
|
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
|
|
|
USE_TZ = True
|