Skip to content

Commit

Permalink
django settings to use postgres db container
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchtech committed May 15, 2016
1 parent 916a3eb commit f8137b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions django-rest/example/settings.py
Expand Up @@ -31,6 +31,7 @@
# Application definition

INSTALLED_APPS = [
'rest_framework',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
Expand Down Expand Up @@ -76,8 +77,11 @@

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'HOST': 'db',
'PORT': 5432,
}
}

Expand Down
1 change: 1 addition & 0 deletions django-rest/example/urls.py
Expand Up @@ -18,4 +18,5 @@

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
]

0 comments on commit f8137b4

Please sign in to comment.