- Deprecate loding setting values from environment (#98 by @stinovlas)
- Fix optional nested dict setting (#92 by @rastytheamateur)
- Fix typos in
usage.rst
(#102 by @oto-stefan) - Fix docs build (#100 by @stinovlas)
- Ignore environment variables when using
override_settings
. - Don't announce type annotations.
- Read setting values from environment variables.
- Add
FileSetting
. - Fix bug causing
NestedDictSetting
to be always required. - Add support for python 3.8 and Django 3.0.
- Drop support for python 2.7 and 3.4.
- Drop deprecated type checkers.
- Add type annotations.
- Raise
ImproperlyConfigured
fromSetting.check
for all errors in a setting. - Move repository to https://github.com/pawamoy/django-appsettings.
- Clean tests.
- Fix
transform_default
inNestedListSetting
, by @stinovlas (see PR #61).
- Add
CallablePathSetting
(see issue #49 and PR #52). - Add
NestedListSetting
(see issue #50 and PR #53). - Rename
NestedSetting
toNestedDictSetting
(old name is still available but deprecated).
- Fix default values for empty arguments.
- Deprecate setting checkers in favor of validators, similarly to Django form fields.
- Add
NestedSetting
for easy management of nested settings.
Going from alpha to beta status. Logic has been reworked.
- An instance of a subclass of
AppSettings
will now dynamically get settings values from project settings, and cache them. This allows to use the instance the same way in code and tests, without performance loss. See issue #16. - Cache is invalidated when Django sends a
setting_changed
signal (i.e. when usingTestCase
oroverride_settings
). See issue #16. - Setting main class now accepts callable as default value, and two new
parameters to keep control on its behavior:
call_default
, which tells if the default value should be called (if callable) or not, andtransform_default
, which tells if the default value should be transformed as well by thetransform
method. See issue #17. - Settings type checkers now have custom parameters like
max_length
,empty
orkey_type
, that can be passed directly through the settings classes as keyword arguments. Check the documentation for more information. - Settings classes have been rewritten more explicitly, using class inheritance
instead of hard-to-debug generators. Composed types like float lists or
boolean sets have been removed in favor of more flexible list, set and tuple
types which now accept an optional
item_type
parameter. ImportedObjectSetting
has been renamedObjectSetting
, and now supports object paths down to arbitrary level of nesting. Before, it only supported object paths down to classes or functions, now you can for example give it the path to a constant in a class within a class, itself contained in a module within a package. It will work as long a the deepest module is importable throughimportlib.import_module
and each object down to the last is obtainable throughgetattr
method.
Many thanks to ziima for having shared good ideas and thoughts!
- Add six dependency (now required).
- Rename
Int
settings toInteger
, andBool
ones toBoolean
. - Remove metaclass generated getters and checkers.
- Settings are not checked when they default to the provided default value.
- Settings classes received better default values corresponding to their types.
- Add
full_name
property toSetting
class. - Add
required
parameter toSetting
class (defaultFalse
).
- Import settings classes in main module to simplify imports.
- Add
PositiveInt
andPositiveFloat
settings. - Add support for Django 1.11.
- Implement basic settings classes.
- Implement basic Setting class.
- Pin dependencies.
- Change distribution name to
app-settings
.
- Alpha release on PyPI.