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
  • Diff rendering mode:
  • inline
  • side by side

swtstore/application.py

156 '[in %(pathname)s:%(lineno)d]')156 '[in %(pathname)s:%(lineno)d]')
157157
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']
160 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)
163165

swtstore/classes/views/sweet.py

1010
11sweet = Module(__name__)11sweet = Module(__name__)
1212
13@sweet.route('/<id>', methods=['GET'])
13@sweet.route('/<int:id>', methods=['GET'])
14def showSweet(id):14def showSweet(id):
15 #current_user = User.getCurrentUser()15 #current_user = User.getCurrentUser()
16 #if current_user is None:16 #if current_user is None: