Djenesis / contributr

An online tool for programmers to find projects they can contribute to and project maintainers to find contributors.
MIT License
16 stars 16 forks source link

Database settings #53

Closed ameistad closed 9 years ago

ameistad commented 9 years ago

I suggest we move the database settings in base.py to local.py. We already have settings for Heroku in production.py and there is no need to import local database settings in production.

I also suggest we read database settings in local from environment variables. If you want to use PostgreSQL you can set the the variable with

export DATABASE_URL=postgres://username:password@127.0.0.1:5432/contributr
# or just
export DATABASE_URL=postgres:///contributr
# for windows
export DATABASE_URL=postgres://localhost/contributr
# sqlite3 example
export DATABASE_URL=sqlite:///db.sqlite3
SanketDG commented 9 years ago

@ameistad Do we really need to load the database settings from a environment variable. Using sqlite3 locally and postgres in production is sufficient and just works.

ameistad commented 9 years ago

Yeah, doesn't matter much, only matters if somebody uses a password on the local database. But let's keep it as is for simplicity.