From 7838a12792be197628ab7f34910f1c87dd113295 Mon Sep 17 00:00:00 2001 From: tr4ck3ur Date: Sun, 15 Feb 2015 14:46:19 +0100 Subject: Fix ckeditor, uploader and add piwik --- jm2l/upload.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'jm2l/upload.py') diff --git a/jm2l/upload.py b/jm2l/upload.py index e063dc4..f0fe718 100644 --- a/jm2l/upload.py +++ b/jm2l/upload.py @@ -97,7 +97,7 @@ class MediaPath(): p = IMAGEPATH + [ media_table ] + [ linked_id ] elif media_table=='tasks': # Use Current Year - p = IMAGEPATH + [ 2015, media_table ] + [ linked_id ] + p = IMAGEPATH + [ str(2015), media_table ] + [ linked_id ] elif media_table in ['RIB', 'Justif']: slug = User.by_id(linked_id).slug p = IMAGEPATH + ['users'] + [ slug ] + [ self.media_table ] @@ -143,7 +143,6 @@ class MediaUpload(MediaPath): if RealMime!=result['type']: result['error'] = 'l\'extension du fichier ne correspond pas à son contenu - ' result['error'] += "( %s vs %s )" % (RealMime, result['type']) - print "%s != %s" % (RealMime, result['type']) return False # Accept images and mime types listed if not RealMime in ACCEPTED_MIMES: @@ -343,7 +342,6 @@ class MediaUpload(MediaPath): result['name'] = os.path.basename(fieldStorage.filename) result['type'] = fieldStorage.type result['size'] = self.get_file_size(fieldStorage.file) - print result if self.validate(result, fieldStorage.file): with open( self.mediapath(result['name'] + '.type'), 'w') as f: f.write(result['type']) @@ -391,7 +389,6 @@ class MediaView(MediaPath): test = f.read() self.request.response.content_type = test except IOError: - print os.path.basename(name)+".type file not found" pass #try: if 1: -- cgit v1.2.3-54-g00ecf