Commit d574b022096a234cf7d345f83edf82df0c32495c
Fix log path resolution; type of id in URL
- Fix log file path resolution in configure_logging
- Fix the type of arguments available in sweet endpoints
| | | | 156 | '[in %(pathname)s:%(lineno)d]') | 156 | '[in %(pathname)s:%(lineno)d]') |
---|
157 | | 157 | |
---|
158 | # Also error can be sent out via email. So we can also have a SMTPHandler? | 158 | # Also error can be sent out via email. So we can also have a SMTPHandler? |
---|
159 | log_file = app.config['LOG_FILE'] | | log_file = app.config['LOG_FILE'] |
---|
160 | max_size = 1024 * 1024 * 20 # Max Size for a log file: 20MB | | max_size = 1024 * 1024 * 20 # Max Size for a log file: 20MB |
---|
| | 159 | log_file = os.path.join(os.path.dirname(__file__), '..', | | | 160 | app.config['LOG_FILE']) |
---|
| | 161 | |
---|
| | 162 | max_size = 1024 * 1024 * 20 # Max Size for a log file: 20MB |
---|
161 | log_handler = RotatingFileHandler(log_file, maxBytes=max_size, | 163 | log_handler = RotatingFileHandler(log_file, maxBytes=max_size, |
---|
162 | backupCount=10) | 164 | backupCount=10) |
---|
163 | | 165 | |
---|
| | | | 10 | | 10 | |
---|
11 | sweet = Module(__name__) | 11 | sweet = Module(__name__) |
---|
12 | | 12 | |
---|
13 | @sweet.route('/<id>', methods=['GET']) | | @sweet.route('/<id>', methods=['GET']) |
---|
| | 13 | @sweet.route('/<int:id>', methods=['GET']) | 14 | def showSweet(id): | 14 | def showSweet(id): |
---|
15 | #current_user = User.getCurrentUser() | 15 | #current_user = User.getCurrentUser() |
---|
16 | #if current_user is None: | 16 | #if current_user is None: |
---|