diff --git a/app/templates/location.html b/app/templates/location.html index 2ac5081..8935a20 100644 --- a/app/templates/location.html +++ b/app/templates/location.html @@ -9,8 +9,11 @@
Name | Address | |||
---|---|---|---|---|
Name | Address | {{ loc.name }} | {{ loc.address }} | + | + Create order + | {%- endfor %} diff --git a/app/views/order.py b/app/views/order.py index 28fcfbc..ad6072d 100644 --- a/app/views/order.py +++ b/app/views/order.py @@ -17,6 +17,9 @@ order_bp = Blueprint('order_bp', 'order') def orders(form=None): if form is None and not current_user.is_anonymous(): form = OrderForm() + location_id = request.args.get('location_id') + form.location_id.default = location_id + form.process() form.populate() return render_template('orders.html', orders=get_orders(), form=form)