Integrated django-dynamic-preferences library into project. Settings are now stored in the database, the ini file only contains a minimal number of settings.

This commit is contained in:
2018-12-10 01:15:10 +02:00
parent d3b057e14e
commit 0329645c37
16 changed files with 169 additions and 353 deletions

View File

@ -0,0 +1,9 @@
def first_non_null(*iterable):
'''
Returns the first element from the iterable which is not None.
If all the elements are 'None', 'None' is returned.
:param iterable: Iterable containing list of elements.
:return: First non-null element, or None if all elements are 'None'.
'''
return next((item for item in iterable if item is not None), None)