changeset 942:598fc223cf59

core: more organisation in constants.py
author Goffi <goffi@goffi.org>
date Fri, 28 Mar 2014 18:07:13 +0100
parents c6d8fc63b1db
children 71926ec2114d
files src/core/constants.py
diffstat 1 files changed, 22 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/constants.py	Fri Mar 28 18:07:02 2014 +0100
+++ b/src/core/constants.py	Fri Mar 28 18:07:13 2014 +0100
@@ -22,11 +22,27 @@
 
 
 class Const(object):
+
+    ## Application ##
     APP_NAME = u'Salut à Toi'
     APP_NAME_SHORT = u'SàT'
     APP_NAME_FULL = u'%s (%s)' % (APP_NAME_SHORT, APP_NAME)
     APP_VERSION = u'0.4.1D' # Please add 'D' at the end for dev versions
 
+
+    ## Parameters ##
+    NO_SECURITY_LIMIT = -1
+    INDIVIDUAL = "individual"
+    GENERAL = "general"
+
+
+    ## Profile and entities ##
+    PROF_KEY_NONE = '@NONE@'
+    PROF_KEY_DEFAULT = '@DEFAULT@'
+    ENTITY_ALL = '@ALL@'
+
+
+    ## Configuration ##
     DEFAULT_CONFIG = {
         'media_dir': '/usr/share/sat/media',
         'pid_dir': '/tmp',
@@ -45,13 +61,12 @@
                     ['%s/' % path for path in list(BaseDirectory.load_config_paths('sat'))]
                     ]
 
-    NO_SECURITY_LIMIT = -1
-    INDIVIDUAL = "individual"
-    GENERAL = "general"
-    SAVEFILE_DATABASE = "sat.db"
-    PROF_KEY_NONE = '@NONE@'
-    PROF_KEY_DEFAULT = '@DEFAULT@'
-    IQ_SET = '/iq[@type="set"]'
 
+    ## Plugins ##
     # names of widely used plugins
     TEXT_CMDS = 'TEXT-COMMANDS'
+
+
+    ## Misc ##
+    SAVEFILE_DATABASE = "sat.db"
+    IQ_SET = '/iq[@type="set"]'