Mercurial > libervia-web
diff src/server/constants.py @ 1113:cdd389ef97bc
server: code style reformatting using black
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 29 Jun 2018 17:45:26 +0200 |
parents | 4d1c4bd4931a |
children |
line wrap: on
line diff
--- a/src/server/constants.py Sun Jun 24 22:21:25 2018 +0200 +++ b/src/server/constants.py Fri Jun 29 17:45:26 2018 +0200 @@ -22,9 +22,9 @@ class Const(constants.Const): - APP_NAME = 'Libervia' + APP_NAME = "Libervia" APP_NAME_FILE = "libervia" - SERVICE_PROFILE = 'libervia' # the SàT profile that is used for exporting the service + SERVICE_PROFILE = "libervia" # the SàT profile that is used for exporting the service SESSION_TIMEOUT = 7200 # Session's timeout, after that the user will be disconnected HTML_DIR = "html/" @@ -44,7 +44,7 @@ SERVER_SECURITY_LIMIT = constants.Const.NO_SECURITY_LIMIT # keys for cache values we can get from browser - ALLOWED_ENTITY_DATA = {'avatar', 'nick'} + ALLOWED_ENTITY_DATA = {"avatar", "nick"} STATIC_RSM_MAX_LIMIT = 100 STATIC_RSM_MAX_DEFAULT = 10 @@ -52,13 +52,33 @@ ## Libervia pages ## PAGES_META_FILE = u"page_meta.py" - PAGES_ACCESS_NONE = u"none" # no access to this page (using its path will return a 404 error) + PAGES_ACCESS_NONE = ( + u"none" + ) # no access to this page (using its path will return a 404 error) PAGES_ACCESS_PUBLIC = u"public" - PAGES_ACCESS_PROFILE = u"profile" # a session with an existing profile must be started - PAGES_ACCESS_ADMIN = u"admin" # only profiles set in admins_list can access the page - PAGES_ACCESS_ALL = (PAGES_ACCESS_NONE, PAGES_ACCESS_PUBLIC, PAGES_ACCESS_PROFILE, PAGES_ACCESS_ADMIN) + PAGES_ACCESS_PROFILE = ( + u"profile" + ) # a session with an existing profile must be started + PAGES_ACCESS_ADMIN = u"admin" # only profiles set in admins_list can access the page + PAGES_ACCESS_ALL = ( + PAGES_ACCESS_NONE, + PAGES_ACCESS_PUBLIC, + PAGES_ACCESS_PROFILE, + PAGES_ACCESS_ADMIN, + ) # names of the page to use for menu - DEFAULT_MENU = ['login', 'chat', 'blog', 'forums', 'photos', 'files', 'events', 'tickets', 'merge-requests', 'app'] + DEFAULT_MENU = [ + "login", + "chat", + "blog", + "forums", + "photos", + "files", + "events", + "tickets", + "merge-requests", + "app", + ] ## Session flags ## FLAG_CONFIRM = u"CONFIRM" @@ -67,8 +87,8 @@ POST_NO_CONFIRM = u"POST_NO_CONFIRM" ## HTTP methods ## - HTTP_METHOD_GET = u'GET' - HTTP_METHOD_POST = u'POST' + HTTP_METHOD_GET = u"GET" + HTTP_METHOD_POST = u"POST" ## HTTP codes ## HTTP_SEE_OTHER = 303 @@ -84,4 +104,17 @@ ## Date/Time ## HTTP_DAYS = ("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun") - HTTP_MONTH = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec") + HTTP_MONTH = ( + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec", + )