|
|
@ -294,15 +294,22 @@ def add_stack():
|
|
|
|
flash("%s stack created" % (stack_name))
|
|
|
|
flash("%s stack created" % (stack_name))
|
|
|
|
return render_template('add_stack.html', stacks=stacks, form=form)
|
|
|
|
return render_template('add_stack.html', stacks=stacks, form=form)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/stacks/tab/<int:id>', methods=['POST', 'GET'])
|
|
|
|
|
|
|
|
def show_stack_in_tab(id):
|
|
|
|
|
|
|
|
return show_stack_by_id(id, is_tab=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/stacks/<int:id>', methods=['POST', 'GET'])
|
|
|
|
@app.route('/stacks/<int:id>', methods=['POST', 'GET'])
|
|
|
|
def show_stack_by_id(id):
|
|
|
|
def show_stack_by_id(id, is_tab=False):
|
|
|
|
|
|
|
|
|
|
|
|
stack = Stack.query.get(id)
|
|
|
|
stack = Stack.query.get(id)
|
|
|
|
if not stack:
|
|
|
|
if not stack:
|
|
|
|
abort (404)
|
|
|
|
abort (404)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
if is_tab == False:
|
|
|
|
return render_template('show_stack_detail.html', stack=stack)
|
|
|
|
return render_template('show_stack_detail.html', stack=stack)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
return render_template('show_stack_detail_tab.html', stack=stack)
|
|
|
|
|
|
|
|
|
|
|
|
## search
|
|
|
|
## search
|
|
|
|
|
|
|
|
|
|
|
|