comparison src/common/constants.py @ 606:7af8f4ab3675 frontends_multi_profiles

browser side: fixed avatar getting + better DEFAULT/EMPTY avatars constants + use of jid.JID for microblog's author
author Goffi <goffi@goffi.org>
date Mon, 09 Feb 2015 21:55:16 +0100
parents 0bbbef1d53a8
children deddd1cd8aa5
comparison
equal deleted inserted replaced
605:917e271975d9 606:7af8f4ab3675
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from sat.core.i18n import D_ 20 from sat.core.i18n import D_
21 from sat_frontends import constants 21 from sat_frontends import constants
22 import os.path
22 23
23 24
24 class Const(constants.Const): 25 class Const(constants.Const):
25 26
26 # Frontend parameters 27 # Frontend parameters
44 NOT_ALLOWED = 'NOT ALLOWED' 45 NOT_ALLOWED = 'NOT ALLOWED'
45 UPLOAD_OK = 'UPLOAD OK' 46 UPLOAD_OK = 'UPLOAD OK'
46 UPLOAD_KO = 'UPLOAD KO' 47 UPLOAD_KO = 'UPLOAD KO'
47 UNKNOWN_ERROR = 'UNMANAGED FAULT STRING (%s)' 48 UNKNOWN_ERROR = 'UNMANAGED FAULT STRING (%s)'
48 49
49 # PATHS 50 # directories
50 AVATARS_DIR = "avatars/" 51 AVATARS_DIR = "avatars/"
52 MEDIA_DIR = "media/"
51 53
52 # Default avatar 54 # avatars
53 DEFAULT_AVATAR = "/media/misc/default_avatar.png" 55 DEFAULT_AVATAR_FILE = "default_avatar.png"
56 DEFAULT_AVATAR_URL = os.path.join(MEDIA_DIR, "misc", DEFAULT_AVATAR_FILE)
57 EMPTY_AVATAR_FILE = "empty_avatar"
58 EMPTY_AVATAR_URL = os.path.join(MEDIA_DIR, "misc", EMPTY_AVATAR_FILE)