def add_commit(path): print 'add_commit' owner_name = path.split('/')[0] repo_name = path.split('/')[1] db.add_commit(session['user'], repo_id=db.get_repo_id(repo_name, owner_name)) path = app.config['UPLOAD_FOLDER'] + '/' + path + '/' files = request.files.to_dict(flat=False)['file'] rh.add_commit(path, files) flash('Successfully commited', 'add_collab_succ') return redirect(url_for('repository', username=owner_name, path=repo_name))