{"action":"created","comment":{"url":"https://api.github.com/repos/learningequality/kolibri/pulls/comments/185569969","pull_request_review_id":116986293,"id":185569969,"diff_hunk":"@@ -126,25 +128,38 @@\n # Database\n # https://docs.djangoproject.com/en/1.9/ref/settings/#databases\n \n-DATABASES = {\n-    'default': {\n-        'ENGINE': 'django.db.backends.sqlite3',\n-        'NAME': os.path.join(KOLIBRI_HOME, 'db.sqlite3'),\n-        'OPTIONS': {\n-            'timeout': 100,\n+if OPTIONS.get(\"DATABASE_ENGINE\") == \"sqlite\":\n+    DATABASES = {\n+        'default': {\n+            'ENGINE': 'django.db.backends.sqlite3',\n+            'NAME': os.path.join(KOLIBRI_HOME, OPTIONS.get('DATABASE_NAME') or 'db.sqlite3'),\n+            'OPTIONS': {\n+                'timeout': 100,\n+            }\n         }\n-    },\n-}\n+    }\n+elif OPTIONS.get(\"DATABASE_ENGINE\") == \"postgres\":\n+    DATABASES = {\n+        'default': {\n+            'ENGINE': 'django.db.backends.postgresql',\n+            'NAME': OPTIONS['DATABASE_NAME'],\n+            'PASSWORD': OPTIONS.get('DATABASE_PASSWORD') or '',\n+            'USER': OPTIONS.get('DATABASE_USER') or '',\n+            'HOST': OPTIONS.get('DATABASE_HOST') or '',\n+        }\n+    }\n \n # Content directories and URLs for channel metadata and content files\n \n+_content_root = os.path.join(KOLIBRI_HOME, OPTIONS.get('CONTENT_ROOT') or 'content')","path":"kolibri/deployment/default/settings/base.py","position":60,"original_position":60,"commit_id":"a6a3f1ebf5592ea093befc25abc201b40bc75f63","original_commit_id":"a6a3f1ebf5592ea093befc25abc201b40bc75f63","user":{"login":"benjaoming","id":374612,"avatar_url":"https://avatars0.githubusercontent.com/u/374612?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaoming","html_url":"https://github.com/benjaoming","followers_url":"https://api.github.com/users/benjaoming/followers","following_url":"https://api.github.com/users/benjaoming/following{/other_user}","gists_url":"https://api.github.com/users/benjaoming/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaoming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaoming/subscriptions","organizations_url":"https://api.github.com/users/benjaoming/orgs","repos_url":"https://api.github.com/users/benjaoming/repos","events_url":"https://api.github.com/users/benjaoming/events{/privacy}","received_events_url":"https://api.github.com/users/benjaoming/received_events","type":"User","site_admin":false},"body":"In the above line, there are defaults being specified outside of `kolibri.utils.conf` -- perhaps better to just specify in one place.","created_at":"2018-05-02T17:08:37Z","updated_at":"2018-05-02T17:08:37Z","html_url":"https://github.com/learningequality/kolibri/pull/3607#discussion_r185569969","pull_request_url":"https://api.github.com/repos/learningequality/kolibri/pulls/3607","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/comments/185569969"},"html":{"href":"https://github.com/learningequality/kolibri/pull/3607#discussion_r185569969"},"pull_request":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/3607"}},"in_reply_to_id":185566700},"pull_request":{"url":"https://api.github.com/repos/learningequality/kolibri/pulls/3607","id":185132295,"html_url":"https://github.com/learningequality/kolibri/pull/3607","diff_url":"https://github.com/learningequality/kolibri/pull/3607.diff","patch_url":"https://github.com/learningequality/kolibri/pull/3607.patch","issue_url":"https://api.github.com/repos/learningequality/kolibri/issues/3607","number":3607,"state":"open","locked":false,"title":"Prototype of ini-based options file, for persistent configuration","user":{"login":"jamalex","id":618416,"avatar_url":"https://avatars0.githubusercontent.com/u/618416?v=4","gravatar_id":"","url":"https://api.github.com/users/jamalex","html_url":"https://github.com/jamalex","followers_url":"https://api.github.com/users/jamalex/followers","following_url":"https://api.github.com/users/jamalex/following{/other_user}","gists_url":"https://api.github.com/users/jamalex/gists{/gist_id}","starred_url":"https://api.github.com/users/jamalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamalex/subscriptions","organizations_url":"https://api.github.com/users/jamalex/orgs","repos_url":"https://api.github.com/users/jamalex/repos","events_url":"https://api.github.com/users/jamalex/events{/privacy}","received_events_url":"https://api.github.com/users/jamalex/received_events","type":"User","site_admin":false},"body":"<!--\r\n 1. Following guidance below, replace …'s with your own words\r\n 2. After saving the PR, tick of completed checklist items\r\n 3. Skip checklist items that are not applicable or not necessary\r\n 4. Delete instruction/comment blocks\r\n-->\r\n\r\n### Summary\r\n<!--\r\n * description of the change\r\n * manual verification steps performed\r\n * screenshots if the PR affects the UI\r\n-->\r\n\r\nPrototype of new options.ini file-based configuration.\r\n\r\n### Reviewer guidance\r\n<!--\r\n * how can a reviewer test these changes?\r\n * are there any risky areas that deserve extra testing\r\n-->\r\n\r\nNo automated tests yet, as I wanted to just get it up there to spur discussion for now. It does seem to work well, though, from manual testing!\r\n\r\n### References\r\n<!--\r\n * references to related issues and PRs\r\n * links to mockups or specs for new features\r\n * links to the diffs for any dependency updates, e.g. in iceqube or the perseus plugin\r\n-->\r\n\r\nAs discussed in https://docs.google.com/document/d/1v-_B7dFlEw9EAOfMSU78IkfhMX9DihzN7jjjxzEUfBk/edit#heading=h.otycu89b2guh\r\n\r\n----\r\n\r\n### Contributor Checklist\r\n\r\n- [ ] Contributor has fully tested the PR manually\r\n- [ ] PR has the correct target branch and milestone\r\n- [x] PR has 'needs review' or 'work-in-progress' label\r\n- [x] If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')\r\n- [ ] If there are any front-end changes, before/after screenshots are included\r\n- [ ] If this is an important user-facing change, PR or related issue has a 'changelog' label\r\n\r\n### Reviewer Checklist\r\n\r\n- [ ] Automated test coverage is satisfactory\r\n- [ ] Reviewer has fully tested the PR manually\r\n- [ ] PR has been tested for [accessibility regressions](http://kolibri-dev.readthedocs.io/en/develop/manual_testing.html#accessibility-a11y-testing)\r\n- [ ] External dependencies files were updated (`yarn` and `pip`)\r\n- [ ] Documentation is updated\r\n- [ ] Link to diff of internal dependency change is included\r\n- [ ] CHANGELOG.rst is updated for high-level changes\r\n- [ ] Contributor is in AUTHORS.rst\r\n","created_at":"2018-05-01T07:13:24Z","updated_at":"2018-05-02T17:08:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd4137e1752b1e6c136a5493c61c08cf59a471b6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rtibbles","id":1680573,"avatar_url":"https://avatars3.githubusercontent.com/u/1680573?v=4","gravatar_id":"","url":"https://api.github.com/users/rtibbles","html_url":"https://github.com/rtibbles","followers_url":"https://api.github.com/users/rtibbles/followers","following_url":"https://api.github.com/users/rtibbles/following{/other_user}","gists_url":"https://api.github.com/users/rtibbles/gists{/gist_id}","starred_url":"https://api.github.com/users/rtibbles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtibbles/subscriptions","organizations_url":"https://api.github.com/users/rtibbles/orgs","repos_url":"https://api.github.com/users/rtibbles/repos","events_url":"https://api.github.com/users/rtibbles/events{/privacy}","received_events_url":"https://api.github.com/users/rtibbles/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":410338452,"url":"https://api.github.com/repos/learningequality/kolibri/labels/PR:%20work-in-progress","name":"PR: work-in-progress","color":"bfd4f2","default":false}],"milestone":{"url":"https://api.github.com/repos/learningequality/kolibri/milestones/23","html_url":"https://github.com/learningequality/kolibri/milestone/23","labels_url":"https://api.github.com/repos/learningequality/kolibri/milestones/23/labels","id":3289998,"number":23,"title":"0.9.2","description":"","creator":{"login":"rtibbles","id":1680573,"avatar_url":"https://avatars3.githubusercontent.com/u/1680573?v=4","gravatar_id":"","url":"https://api.github.com/users/rtibbles","html_url":"https://github.com/rtibbles","followers_url":"https://api.github.com/users/rtibbles/followers","following_url":"https://api.github.com/users/rtibbles/following{/other_user}","gists_url":"https://api.github.com/users/rtibbles/gists{/gist_id}","starred_url":"https://api.github.com/users/rtibbles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtibbles/subscriptions","organizations_url":"https://api.github.com/users/rtibbles/orgs","repos_url":"https://api.github.com/users/rtibbles/repos","events_url":"https://api.github.com/users/rtibbles/events{/privacy}","received_events_url":"https://api.github.com/users/rtibbles/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":6,"state":"open","created_at":"2018-04-23T14:51:26Z","updated_at":"2018-05-02T15:06:17Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/learningequality/kolibri/pulls/3607/commits","review_comments_url":"https://api.github.com/repos/learningequality/kolibri/pulls/3607/comments","review_comment_url":"https://api.github.com/repos/learningequality/kolibri/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learningequality/kolibri/issues/3607/comments","statuses_url":"https://api.github.com/repos/learningequality/kolibri/statuses/a6a3f1ebf5592ea093befc25abc201b40bc75f63","head":{"label":"jamalex:ini_prototype","ref":"ini_prototype","sha":"a6a3f1ebf5592ea093befc25abc201b40bc75f63","user":{"login":"jamalex","id":618416,"avatar_url":"https://avatars0.githubusercontent.com/u/618416?v=4","gravatar_id":"","url":"https://api.github.com/users/jamalex","html_url":"https://github.com/jamalex","followers_url":"https://api.github.com/users/jamalex/followers","following_url":"https://api.github.com/users/jamalex/following{/other_user}","gists_url":"https://api.github.com/users/jamalex/gists{/gist_id}","starred_url":"https://api.github.com/users/jamalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamalex/subscriptions","organizations_url":"https://api.github.com/users/jamalex/orgs","repos_url":"https://api.github.com/users/jamalex/repos","events_url":"https://api.github.com/users/jamalex/events{/privacy}","received_events_url":"https://api.github.com/users/jamalex/received_events","type":"User","site_admin":false},"repo":{"id":51463055,"name":"kolibri","full_name":"jamalex/kolibri","owner":{"login":"jamalex","id":618416,"avatar_url":"https://avatars0.githubusercontent.com/u/618416?v=4","gravatar_id":"","url":"https://api.github.com/users/jamalex","html_url":"https://github.com/jamalex","followers_url":"https://api.github.com/users/jamalex/followers","following_url":"https://api.github.com/users/jamalex/following{/other_user}","gists_url":"https://api.github.com/users/jamalex/gists{/gist_id}","starred_url":"https://api.github.com/users/jamalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamalex/subscriptions","organizations_url":"https://api.github.com/users/jamalex/orgs","repos_url":"https://api.github.com/users/jamalex/repos","events_url":"https://api.github.com/users/jamalex/events{/privacy}","received_events_url":"https://api.github.com/users/jamalex/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamalex/kolibri","description":"This is where Kolibri shall be born, watch and participate!","fork":true,"url":"https://api.github.com/repos/jamalex/kolibri","forks_url":"https://api.github.com/repos/jamalex/kolibri/forks","keys_url":"https://api.github.com/repos/jamalex/kolibri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamalex/kolibri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamalex/kolibri/teams","hooks_url":"https://api.github.com/repos/jamalex/kolibri/hooks","issue_events_url":"https://api.github.com/repos/jamalex/kolibri/issues/events{/number}","events_url":"https://api.github.com/repos/jamalex/kolibri/events","assignees_url":"https://api.github.com/repos/jamalex/kolibri/assignees{/user}","branches_url":"https://api.github.com/repos/jamalex/kolibri/branches{/branch}","tags_url":"https://api.github.com/repos/jamalex/kolibri/tags","blobs_url":"https://api.github.com/repos/jamalex/kolibri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamalex/kolibri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamalex/kolibri/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamalex/kolibri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamalex/kolibri/statuses/{sha}","languages_url":"https://api.github.com/repos/jamalex/kolibri/languages","stargazers_url":"https://api.github.com/repos/jamalex/kolibri/stargazers","contributors_url":"https://api.github.com/repos/jamalex/kolibri/contributors","subscribers_url":"https://api.github.com/repos/jamalex/kolibri/subscribers","subscription_url":"https://api.github.com/repos/jamalex/kolibri/subscription","commits_url":"https://api.github.com/repos/jamalex/kolibri/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamalex/kolibri/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamalex/kolibri/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamalex/kolibri/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamalex/kolibri/contents/{+path}","compare_url":"https://api.github.com/repos/jamalex/kolibri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamalex/kolibri/merges","archive_url":"https://api.github.com/repos/jamalex/kolibri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamalex/kolibri/downloads","issues_url":"https://api.github.com/repos/jamalex/kolibri/issues{/number}","pulls_url":"https://api.github.com/repos/jamalex/kolibri/pulls{/number}","milestones_url":"https://api.github.com/repos/jamalex/kolibri/milestones{/number}","notifications_url":"https://api.github.com/repos/jamalex/kolibri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamalex/kolibri/labels{/name}","releases_url":"https://api.github.com/repos/jamalex/kolibri/releases{/id}","deployments_url":"https://api.github.com/repos/jamalex/kolibri/deployments","created_at":"2016-02-10T18:44:39Z","updated_at":"2016-02-10T18:44:40Z","pushed_at":"2018-05-01T07:09:09Z","git_url":"git://github.com/jamalex/kolibri.git","ssh_url":"git@github.com:jamalex/kolibri.git","clone_url":"https://github.com/jamalex/kolibri.git","svn_url":"https://github.com/jamalex/kolibri","homepage":"http://learningequality.org/kolibri/","size":37085,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"learningequality:release-v0.9.x","ref":"release-v0.9.x","sha":"ddeed38c764d9f218ea067b4aeb3d5d514db8e96","user":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars1.githubusercontent.com/u/3926525?v=4","gravatar_id":"","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"repo":{"id":49976939,"name":"kolibri","full_name":"learningequality/kolibri","owner":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars1.githubusercontent.com/u/3926525?v=4","gravatar_id":"","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learningequality/kolibri","description":"Kolibri: the offline app for universal education","fork":false,"url":"https://api.github.com/repos/learningequality/kolibri","forks_url":"https://api.github.com/repos/learningequality/kolibri/forks","keys_url":"https://api.github.com/repos/learningequality/kolibri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learningequality/kolibri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learningequality/kolibri/teams","hooks_url":"https://api.github.com/repos/learningequality/kolibri/hooks","issue_events_url":"https://api.github.com/repos/learningequality/kolibri/issues/events{/number}","events_url":"https://api.github.com/repos/learningequality/kolibri/events","assignees_url":"https://api.github.com/repos/learningequality/kolibri/assignees{/user}","branches_url":"https://api.github.com/repos/learningequality/kolibri/branches{/branch}","tags_url":"https://api.github.com/repos/learningequality/kolibri/tags","blobs_url":"https://api.github.com/repos/learningequality/kolibri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learningequality/kolibri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learningequality/kolibri/git/refs{/sha}","trees_url":"https://api.github.com/repos/learningequality/kolibri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learningequality/kolibri/statuses/{sha}","languages_url":"https://api.github.com/repos/learningequality/kolibri/languages","stargazers_url":"https://api.github.com/repos/learningequality/kolibri/stargazers","contributors_url":"https://api.github.com/repos/learningequality/kolibri/contributors","subscribers_url":"https://api.github.com/repos/learningequality/kolibri/subscribers","subscription_url":"https://api.github.com/repos/learningequality/kolibri/subscription","commits_url":"https://api.github.com/repos/learningequality/kolibri/commits{/sha}","git_commits_url":"https://api.github.com/repos/learningequality/kolibri/git/commits{/sha}","comments_url":"https://api.github.com/repos/learningequality/kolibri/comments{/number}","issue_comment_url":"https://api.github.com/repos/learningequality/kolibri/issues/comments{/number}","contents_url":"https://api.github.com/repos/learningequality/kolibri/contents/{+path}","compare_url":"https://api.github.com/repos/learningequality/kolibri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learningequality/kolibri/merges","archive_url":"https://api.github.com/repos/learningequality/kolibri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learningequality/kolibri/downloads","issues_url":"https://api.github.com/repos/learningequality/kolibri/issues{/number}","pulls_url":"https://api.github.com/repos/learningequality/kolibri/pulls{/number}","milestones_url":"https://api.github.com/repos/learningequality/kolibri/milestones{/number}","notifications_url":"https://api.github.com/repos/learningequality/kolibri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learningequality/kolibri/labels{/name}","releases_url":"https://api.github.com/repos/learningequality/kolibri/releases{/id}","deployments_url":"https://api.github.com/repos/learningequality/kolibri/deployments","created_at":"2016-01-19T19:22:07Z","updated_at":"2018-05-02T09:23:00Z","pushed_at":"2018-05-02T16:48:00Z","git_url":"git://github.com/learningequality/kolibri.git","ssh_url":"git@github.com:learningequality/kolibri.git","clone_url":"https://github.com/learningequality/kolibri.git","svn_url":"https://github.com/learningequality/kolibri","homepage":"http://learningequality.org/kolibri/","size":37604,"stargazers_count":163,"watchers_count":163,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"archived":false,"open_issues_count":244,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":128,"open_issues":244,"watchers":163,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/3607"},"html":{"href":"https://github.com/learningequality/kolibri/pull/3607"},"issue":{"href":"https://api.github.com/repos/learningequality/kolibri/issues/3607"},"comments":{"href":"https://api.github.com/repos/learningequality/kolibri/issues/3607/comments"},"review_comments":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/3607/comments"},"review_comment":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/3607/commits"},"statuses":{"href":"https://api.github.com/repos/learningequality/kolibri/statuses/a6a3f1ebf5592ea093befc25abc201b40bc75f63"}},"author_association":"OWNER"}}
{"actor":{"display_login":"benjaoming"}}