aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--development.ini7
-rw-r--r--jm2l/models.py1
-rw-r--r--jm2l/upload.py13
-rw-r--r--jm2l/views.py7
-rw-r--r--production.ini2
-rw-r--r--wsgi.py2
6 files changed, 11 insertions, 21 deletions
diff --git a/development.ini b/development.ini
index 2ef906c..e36ed74 100644
--- a/development.ini
+++ b/development.ini
@@ -6,7 +6,8 @@
[app:main]
use = egg:JM2L
-pyramid.reload_templates = true
+pyramid.reload_templates = false
+#true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
@@ -14,6 +15,8 @@ pyramid.default_locale_name = en
pyramid.includes =
pyramid_debugtoolbar
pyramid_tm
+ pyramid_mako
+ pyramid_exclog
sqlalchemy.url = sqlite:///%(here)s/JM2L.sqlite
@@ -64,7 +67,7 @@ qualname = sqlalchemy.engine
[handler_console]
class = StreamHandler
args = (sys.stderr,)
-level = NOTSET
+level = DEBUG
formatter = generic
[formatter_generic]
diff --git a/jm2l/models.py b/jm2l/models.py
index f104228..cd23451 100644
--- a/jm2l/models.py
+++ b/jm2l/models.py
@@ -153,7 +153,6 @@ class User(Base):
@classmethod
def by_hash(cls, tsthash):
for u in DBSession.query(cls):
- print u.nom, u.my_hash
if u.my_hash==tsthash:
return u
return None
diff --git a/jm2l/upload.py b/jm2l/upload.py
index ed9b3e1..e063dc4 100644
--- a/jm2l/upload.py
+++ b/jm2l/upload.py
@@ -48,11 +48,9 @@ class MediaPath():
def get_list(self, media_table, linked_id):
filelist = list()
curpath = self.get_mediapath(media_table, linked_id, None)
- print curpath
if not os.path.isdir(curpath):
return list()
for f in os.listdir(curpath):
- print curpath
if os.path.isdir(os.path.join(curpath,f)):
continue
if f.endswith('.type'):
@@ -69,7 +67,6 @@ class MediaPath():
if not os.path.isdir(curpath):
return list()
for f in os.listdir(curpath):
- print curpath
if os.path.isdir(os.path.join(curpath,f)):
continue
if f.endswith('.type'):
@@ -154,9 +151,7 @@ class MediaUpload(MediaPath):
result['error'] = 'Ce type fichier n\'est malheureusement pas supporté. '
result['error'] += 'Les fichiers acceptées sont les images et pdf.'
return False
- print result['size']
if result['size'] < MIN_FILE_SIZE:
- raise
result['error'] = 'le fichier est trop petit'
elif result['size'] > MAX_FILE_SIZE:
result['error'] = 'le fichier est trop voluminueux'
@@ -254,7 +249,6 @@ class MediaUpload(MediaPath):
def fileinfo(self,name):
filename = self.mediapath(name)
f, ext = os.path.splitext(name)
- print "fileinfo ? '%s'" % name, filename
if ext!='.type' and os.path.isfile(filename):
info = {}
info['name'] = name
@@ -318,21 +312,18 @@ class MediaUpload(MediaPath):
except IOError:
pass
except OSError:
- print self.mediapath(filename) + '.type', 'Not found'
pass
try:
os.remove(self.thumbnailpath(filename))
except IOError:
pass
- except OSError:
- print self.thumbnailpath(filename), 'Not found'
+ except OSError:
pass
try:
os.remove(self.thumbnailpath(filename+".jpg"))
except IOError:
pass
- except OSError:
- print self.thumbnailpath(filename), 'Not found'
+ except OSError:
pass
try:
os.remove(self.mediapath(filename))
diff --git a/jm2l/views.py b/jm2l/views.py
index 6a94e6d..cd7586e 100644
--- a/jm2l/views.py
+++ b/jm2l/views.py
@@ -477,8 +477,6 @@ def Modal(request):
request=request)
response.content_type = 'text/javascript'
return response
- else:
- print form.errors
if modtype in ['AskC', 'AskH', 'AskM', 'PropC', 'PropH', 'PropM']:
if uid>0:
Exch = Exchange.by_id(uid)
@@ -553,10 +551,7 @@ def Modal(request):
created_by=1
)
DBSession.add(Itinerary)
- DBSession.flush()
- print form.start_place.data
- print form.arrival_place.data
- print form.itin_id.data
+ DBSession.flush()
Exch.itin_id = Itinerary.itin_id
# Start Time
StartEvent = DBSession.query(JM2L_Year.start_time).filter(JM2L_Year.year_uid==year).first()
diff --git a/production.ini b/production.ini
index e2380ce..382dbb1 100644
--- a/production.ini
+++ b/production.ini
@@ -13,6 +13,8 @@ pyramid.debug_routematch = false
pyramid.default_locale_name = fr
pyramid.includes =
pyramid_tm
+ pyramid_mako
+ pyramid_exclog
sqlalchemy.url = sqlite:///%(here)s/JM2L.sqlite
diff --git a/wsgi.py b/wsgi.py
index c03da7a..f77fb80 100644
--- a/wsgi.py
+++ b/wsgi.py
@@ -1,4 +1,4 @@
-APP_CONFIG = "production.ini"
+APP_CONFIG = "prod.ini"
#Setup logging
import logging.config