Roberto Rosario
a99b044555
Code style improvement. Test code consolidation. PEP8 cleanups.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-10-06 02:13:36 -04:00
Roberto Rosario
58cb79c95a
Interpret environment variables as YAML.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-26 05:06:53 -04:00
Roberto Rosario
34b3cc3286
Fix the error number constant and display a log warning.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-22 12:25:04 -04:00
Roberto Rosario
5a2f7495c1
Add missing import.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-22 04:07:05 -04:00
Roberto Rosario
a33027dc39
Don't error out if the path to the backup setting file doesn't exist.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-22 02:28:37 -04:00
Roberto Rosario
958f85eb1e
Fix YAML quoting issues.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-20 02:49:10 -04:00
Roberto Rosario
885be348d4
Improve setting dump serialization.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-19 03:50:15 -04:00
Roberto Rosario
90cd142e76
Add support for YAML configuration files. Add support for editing setting options and saving them using the new YAML configuration file support. Add new revertsettings management command. Add new permission to edit setting via the UI.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-16 03:05:26 -04:00
Roberto Rosario
eab3b660cb
Update exception detection to work with Python3 format.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-08-29 02:04:04 -04:00
Roberto Rosario
bda44212b1
Disregard the last 3 dots that mark the end of the YAML document.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-08-10 01:23:27 -04:00
Roberto Rosario
32056761c8
Sort settings by namespace label and by global name second.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-13 21:27:10 -04:00
Roberto Rosario
6c6ca38374
Replace all instances of unicode only handling to use force_text.
...
Replace all __unicode__ methods to __str__ and the
@python_2_unicode_compatible decorator.
Replace all instance of smart_str, smart_unicode, force_uncode
with force_text.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-05 15:03:24 -04:00
Roberto Rosario
e19a723c41
Decreased smart settings import debug messages.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-03 13:48:13 -04:00
Roberto Rosario
b79a64c5ed
Add template tag to fetch the value of a smart setting.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-06-20 04:15:38 -04:00
Roberto Rosario
a105fe46a5
Add support for updating configuration options from environment variables.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-06-18 03:08:03 -04:00
Roberto Rosario
ff7091cd80
Make sure the smart setting instance value cache is valid before
...
display its serialize version.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-03-20 01:44:39 -04:00
Roberto Rosario
4e7559d396
Add settings class cache invalidation method. Update common.tests.base.BaseTestCase
...
class to invalidate settings cache. Update tests using Django's TestCase to
BaseTestCase.
2017-01-14 00:13:35 -04:00
Roberto Rosario
8ae57a0fb6
Don't cache settings on creation but on first use.
2017-01-07 01:09:19 -04:00
Roberto Rosario
895dd9dc33
Optimize setting retrieval. Remove support for path settings checking.
...
Settings should be just a key, value storage.
2016-12-31 02:21:23 -04:00
Roberto Rosario
81c7a90c04
Fix message typo.
2015-10-19 00:56:11 -04:00
Roberto Rosario
a1d8f34e69
Don't cache the value of a setting.
2015-09-06 03:59:31 -04:00
Roberto Rosario
bbfd158e28
Move setting namespace initalization code to the class itself. Add method to invalidate all setting caches. Use smart setting cache invalidation for properly test advanced search pagination.
2015-09-06 02:49:27 -04:00
Roberto Rosario
4527563d89
PEP8 cleanups, specially E501 line too long.
2015-07-22 18:21:37 -04:00
Roberto Rosario
c275988c90
PEP8 cleanups, E501: 79 character long lines.
2015-07-19 03:27:41 -04:00
Roberto Rosario
68c718fe4c
Allow settings to serialize lazy translations.
2015-07-17 01:41:44 -04:00
Roberto Rosario
77ab118a68
Access serialized value via property.
2015-07-17 00:59:47 -04:00
Roberto Rosario
f97bbd98bd
Fix typo.
2015-07-08 04:05:10 -04:00
Roberto Rosario
6a13e2adc8
Make a clear distinction between serialized and deserialized setting values.
2015-07-08 03:31:45 -04:00
Roberto Rosario
ead8ba9a12
Don't dump the setting name to YAML.
2015-07-08 02:56:19 -04:00
Roberto Rosario
f55929403b
Add setter to change the value of a setting.
2015-07-06 00:48:16 -04:00
Roberto Rosario
e4623fadcd
PEP8 cleanups
2015-06-23 02:23:23 -04:00
Roberto Rosario
78198f3398
Smart settings refactor
2015-06-22 21:04:06 -04:00