comparison src/common/constants.py @ 961:22fe06569b1a

server: moved logging worflow in separated method, so it can be used by Libervia Pages
author Goffi <goffi@goffi.org>
date Fri, 27 Oct 2017 18:35:23 +0200
parents 0c0551967bdf
children fd4eae654182
comparison
equal deleted inserted replaced
960:e59edcae4c18 961:22fe06569b1a
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 # MISC 31 # REGISTRATION
32 PASSWORD_MIN_LENGTH = 6 # for new account creation 32 # XXX: for now libervia forces the creation to lower case
33 # XXX: Regex patterns must be compatible with both Python and JS
34 REG_LOGIN_RE = r'^[a-z0-9_-]+$'
35 REG_EMAIL_RE = r'^.+@.+\..+'
36 PASSWORD_MIN_LENGTH = 6
33 37
34 # HTTP REQUEST RESULT VALUES 38 # HTTP REQUEST RESULT VALUES
35 PROFILE_AUTH_ERROR = 'PROFILE AUTH ERROR' 39 PROFILE_AUTH_ERROR = 'PROFILE AUTH ERROR'
36 XMPP_AUTH_ERROR = 'XMPP AUTH ERROR' 40 XMPP_AUTH_ERROR = 'XMPP AUTH ERROR'
37 ALREADY_WAITING = 'ALREADY WAITING' 41 ALREADY_WAITING = 'ALREADY WAITING'
38 SESSION_ACTIVE = 'SESSION ACTIVE' 42 SESSION_ACTIVE = 'SESSION ACTIVE'
43 NOT_CONNECTED = 'NOT CONNECTED'
39 PROFILE_LOGGED = 'LOGGED' 44 PROFILE_LOGGED = 'LOGGED'
40 PROFILE_LOGGED_REGISTERED_WITH_EXT_JID = 'LOGGED (REGISTERED WITH EXTERNAL JID)' 45 PROFILE_LOGGED_EXT_JID = 'LOGGED (REGISTERED WITH EXTERNAL JID)'
41 ALREADY_EXISTS = 'ALREADY EXISTS' 46 ALREADY_EXISTS = 'ALREADY EXISTS'
42 REGISTRATION_SUCCEED = 'REGISTRATION' 47 REGISTRATION_SUCCEED = 'REGISTRATION'
43 INTERNAL_ERROR = 'INTERNAL ERROR' 48 INTERNAL_ERROR = 'INTERNAL ERROR'
49 INVALID_INPUT = 'INVALID INPUT'
44 BAD_REQUEST = 'BAD REQUEST' 50 BAD_REQUEST = 'BAD REQUEST'
45 NO_REPLY = 'NO REPLY' 51 NO_REPLY = 'NO REPLY'
46 NOT_ALLOWED = 'NOT ALLOWED' 52 NOT_ALLOWED = 'NOT ALLOWED'
47 UPLOAD_OK = 'UPLOAD OK' 53 UPLOAD_OK = 'UPLOAD OK'
48 UPLOAD_KO = 'UPLOAD KO' 54 UPLOAD_KO = 'UPLOAD KO'