Commit 67f5a6e5 authored by Yuanle Song's avatar Yuanle Song
Browse files

v0.15.0 add default db config variables in config.py

parent 7bc9fcd2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ Time-stamp: <2016-09-08>
* current							      :entry:
** 
** 2016-09-08 integrate sanity-check
- update yygame-utils pkg version
- in Makefile
 check: just-test
+sanity-check:
+1 −1
Original line number Diff line number Diff line
(defproject python/lein-template "0.14.0"
(defproject python/lein-template "0.15.0"
  :description "lein template for a python project"
  :repositories [["snapshots"
                  {:url "http://devserv.game.yy.com/nexus/content/repositories/snapshots"
+12 −0
Original line number Diff line number Diff line
@@ -20,7 +20,19 @@ logger = logging.getLogger(__name__)

TESTING = os.getenv("PYTEST") == "1"

# set root logger level to ERROR when running unit test.
if TESTING:
    logging.getLogger('').setLevel(logging.ERROR)

DEFAULTS = {
    "db.host": "localhost",
    "db.port": "5432",
    "db.name": "{{name}}",
    "db.user": "{{name}}",
    "db.password": "",
    "redis.host": "localhost",
    "redis.port": "6379",
    "redis.db": "0",
}

OPTIONAL_KEYS = list(DEFAULTS.keys())