started defining some application wide consts. these consts (more to come
if my approach is accepted) are used all over the fpdb and should always be taken from one place
This commit is contained in:
parent
34bbc45cb8
commit
9e94f44fa7
|
@ -44,7 +44,22 @@ except ConfigParser.NoSectionError: # debian package path
|
||||||
|
|
||||||
log = logging.getLogger("config")
|
log = logging.getLogger("config")
|
||||||
log.debug("config logger initialised")
|
log.debug("config logger initialised")
|
||||||
|
########################################################################
|
||||||
|
# application wide consts
|
||||||
|
|
||||||
|
APPLICATION_NAME_SHORT = 'fpdb'
|
||||||
|
APPLICATION_VERSION = 'xx.xx.xx'
|
||||||
|
|
||||||
|
DATABASE_TYPE_POSTGRESQL = 'postgresql'
|
||||||
|
DATABASE_TYPE_SQLITE = 'sqlite'
|
||||||
|
DATABASE_TYPE_MYSQL = 'mysql'
|
||||||
|
DATABASE_TYPES = (
|
||||||
|
DATABASE_TYPE_POSTGRESQL,
|
||||||
|
DATABASE_TYPE_SQLITE,
|
||||||
|
DATABASE_TYPE_MYSQL,
|
||||||
|
)
|
||||||
|
|
||||||
|
########################################################################
|
||||||
def string_to_bool(string, default=True):
|
def string_to_bool(string, default=True):
|
||||||
"""converts a string representation of a boolean value to boolean True or False
|
"""converts a string representation of a boolean value to boolean True or False
|
||||||
@param string: (str) the string to convert
|
@param string: (str) the string to convert
|
||||||
|
|
Loading…
Reference in New Issue
Block a user