aurweb/web/lib
Eli Schwartz 97c5bcec13 config: allow reading both the defaults file and the modified config
In the process, rename config.proto to config.defaults (because that is
what it is now).

Also use dict.get('key', default_value) when querying os.environ, rather
than an if block, as it is more pythonic/readable/concise, and reduces
the number of dict lookups.

This change allows aurweb configuration to be done via either:
- copying config.defaults to config and modifying values
- creating a new config only containing modified values, next to a
  config.defaults containing unmodified values

The motivation for this change is to enable ansible configuration in our
flagship deployment by storing only changed values, and deferring to
config.defaults otherwise.

A side benefit is, it is easier to see what has changed by inspecting
only the site configuration file.

If a config.defaults file does not exist next to $AUR_CONFIG or in
$AUR_CONFIG_DEFAULTS, it is ignored and *all* values are expected to
live in the modified config file.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2018-04-22 09:26:10 +02:00
..
acctfuncs.inc.php Allow setting an empty home page 2017-12-03 13:52:28 +01:00
aur.inc.php Only allow valid HTTP(s) URLs as home page 2017-11-05 08:55:24 +01:00
aurjson.class.php RPC: Allow to search packages by "*depends" fields 2018-02-24 14:57:31 +01:00
cachefuncs.inc.php Update cache code to INI style configuration 2018-03-10 16:48:14 +01:00
confparser.inc.php config: allow reading both the defaults file and the modified config 2018-04-22 09:26:10 +02:00
credentials.inc.php Add comment undeletion functionality 2016-01-23 11:50:03 +01:00
DB.class.php Fix DB.class.php to match config and include SQLite support 2016-11-10 18:31:20 +01:00
feedcreator.class.php Avoid use of "<b>"/"</b>" 2012-09-24 12:23:05 +02:00
gettext.php Rename constructors to __construct 2016-01-28 22:55:32 +01:00
pkgbasefuncs.inc.php Remove unused variable $dbh in pkgbase_display_details 2018-03-10 16:47:11 +01:00
pkgfuncs.inc.php Remove disjunction in pkg_providers query 2018-02-24 14:57:31 +01:00
pkgreqfuncs.inc.php Add a parameter to skip old requests to pkgreq_list() 2017-02-15 07:13:01 +01:00
routing.inc.php Add support for Terms of Service documents 2017-04-30 16:47:13 +02:00
stats.inc.php Handle empty resultset getting recent 10 packages 2018-03-21 07:45:26 +01:00
streams.php Rename constructors to __construct 2016-01-28 22:55:32 +01:00
timezone.inc.php Fix warning with invalid time zone 2017-02-27 18:20:00 +01:00
translator.inc.php Fix SQL query to retrieve language setting 2017-02-27 19:49:15 +01:00
version.inc.php Release 4.6.0 2017-12-03 10:23:46 +01:00