def offers1(id): if request.method == 'POST': return redirect(url_for('index')) return render_template('offers.html', User=User.get_user(id), offers=Offer.all())
def logged(): if 'email' in session: return render_template('logged.html', offers=Offer.all()) else: return redirect(url_for('unlogged'))
def offers(): if request.method == 'POST': return redirect(url_for('index')) return render_template('offers.html', User=None, offers=Offer.all())
def delete(id): offer = Offer.find(id) name = User.get_user(offer.seller_id) offer.delete() return render_template('offers.html', User=name, offers=Offer.all())