comparison src/common/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 f2170536ba23
children 1f67b003c312
comparison
equal deleted inserted replaced
1112:f287fc8bb31a 1113:cdd389ef97bc
23 23
24 class Const(constants.Const): 24 class Const(constants.Const):
25 25
26 # XXX: we don't want to use the APP_VERSION inherited from sat.core.constants version 26 # XXX: we don't want to use the APP_VERSION inherited from sat.core.constants version
27 # as we use this version to check that there is not a mismatch with backend 27 # as we use this version to check that there is not a mismatch with backend
28 APP_VERSION = u'0.7.0D' # Please add 'D' at the end for dev versions 28 APP_VERSION = u"0.7.0D" # Please add 'D' at the end for dev versions
29 LIBERVIA_MAIN_PAGE = "libervia.html" 29 LIBERVIA_MAIN_PAGE = "libervia.html"
30 30
31 # REGISTRATION 31 # REGISTRATION
32 # XXX: for now libervia forces the creation to lower case 32 # XXX: for now libervia forces the creation to lower case
33 # XXX: Regex patterns must be compatible with both Python and JS 33 # XXX: Regex patterns must be compatible with both Python and JS
34 REG_LOGIN_RE = r'^[a-z0-9_-]+$' 34 REG_LOGIN_RE = r"^[a-z0-9_-]+$"
35 REG_EMAIL_RE = r'^.+@.+\..+' 35 REG_EMAIL_RE = r"^.+@.+\..+"
36 PASSWORD_MIN_LENGTH = 6 36 PASSWORD_MIN_LENGTH = 6
37 37
38 # HTTP REQUEST RESULT VALUES 38 # HTTP REQUEST RESULT VALUES
39 PROFILE_AUTH_ERROR = 'PROFILE AUTH ERROR' 39 PROFILE_AUTH_ERROR = "PROFILE AUTH ERROR"
40 XMPP_AUTH_ERROR = 'XMPP AUTH ERROR' 40 XMPP_AUTH_ERROR = "XMPP AUTH ERROR"
41 ALREADY_WAITING = 'ALREADY WAITING' 41 ALREADY_WAITING = "ALREADY WAITING"
42 SESSION_ACTIVE = 'SESSION ACTIVE' 42 SESSION_ACTIVE = "SESSION ACTIVE"
43 NOT_CONNECTED = 'NOT CONNECTED' 43 NOT_CONNECTED = "NOT CONNECTED"
44 PROFILE_LOGGED = 'LOGGED' 44 PROFILE_LOGGED = "LOGGED"
45 PROFILE_LOGGED_EXT_JID = 'LOGGED (REGISTERED WITH EXTERNAL JID)' 45 PROFILE_LOGGED_EXT_JID = "LOGGED (REGISTERED WITH EXTERNAL JID)"
46 ALREADY_EXISTS = 'ALREADY EXISTS' 46 ALREADY_EXISTS = "ALREADY EXISTS"
47 REGISTRATION_SUCCEED = 'REGISTRATION' 47 REGISTRATION_SUCCEED = "REGISTRATION"
48 INTERNAL_ERROR = 'INTERNAL ERROR' 48 INTERNAL_ERROR = "INTERNAL ERROR"
49 INVALID_INPUT = 'INVALID INPUT' 49 INVALID_INPUT = "INVALID INPUT"
50 BAD_REQUEST = 'BAD REQUEST' 50 BAD_REQUEST = "BAD REQUEST"
51 NO_REPLY = 'NO REPLY' 51 NO_REPLY = "NO REPLY"
52 NOT_ALLOWED = 'NOT ALLOWED' 52 NOT_ALLOWED = "NOT ALLOWED"
53 UPLOAD_OK = 'UPLOAD OK' 53 UPLOAD_OK = "UPLOAD OK"
54 UPLOAD_KO = 'UPLOAD KO' 54 UPLOAD_KO = "UPLOAD KO"
55 55
56 # directories 56 # directories
57 MEDIA_DIR = "media/" 57 MEDIA_DIR = "media/"
58 CACHE_DIR = "cache" 58 CACHE_DIR = "cache"
59 59
62 DEFAULT_AVATAR_URL = os.path.join(MEDIA_DIR, "misc", DEFAULT_AVATAR_FILE) 62 DEFAULT_AVATAR_URL = os.path.join(MEDIA_DIR, "misc", DEFAULT_AVATAR_FILE)
63 EMPTY_AVATAR_FILE = "empty_avatar" 63 EMPTY_AVATAR_FILE = "empty_avatar"
64 EMPTY_AVATAR_URL = os.path.join(MEDIA_DIR, "misc", EMPTY_AVATAR_FILE) 64 EMPTY_AVATAR_URL = os.path.join(MEDIA_DIR, "misc", EMPTY_AVATAR_FILE)
65 65
66 # blog 66 # blog
67 MAM_FILTER_CATEGORY = 'http://salut-a-toi.org/protocols/mam_filter_category' 67 MAM_FILTER_CATEGORY = "http://salut-a-toi.org/protocols/mam_filter_category"