Skip to content

Commit

Permalink
Testing if database connection works ok.
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Romo committed Aug 12, 2016
1 parent 50d9a53 commit 6388718
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.pyc
env/
env.txt
10 changes: 7 additions & 3 deletions banded/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.environ.get('DB_NAME'),
'USER': os.environ.get('DB_USERNAME'),
'PASSWORD': os.environ.get('DB_PASSWORD'),
'HOST': os.environ.get('DB_HOST'),
'PORT': os.environ.get('DB_PORT'),
}
}
}


# Password validation
Expand Down
20 changes: 20 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,23 @@ A new take on banded. Done better, and stronger and smarter.


Just adding some text to test dev deployment.


working with this locally??


You'll need a few things.

Firstly, I used a postgres DB. According to the fine producers of the Djaango project, it provides great features that the other db's just don't.
P.S. I like having JSON on my objects...just saying.

To get this working on a mac locally you need a DB driver

$ brew install postgresql

of course, you'll need the an actual DB behind the resources. I have environment vars. What do you have?

Then, install the requirements.

$ pip install -r requiremenst.txt

3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Django==1.10
gunicorn==19.3.0
gunicorn==19.6.0
psycopg2==2.6.2

0 comments on commit 6388718

Please sign in to comment.