def delete_shipments(subscription_id): subscription = subscriptionServices.get_one_db(subscription_id) subscriptionServices.delete_all_shipments(subscription) week_days = get_week_names() return render_template('/subscriptions/subscription.html', subscription=subscription, week_days=week_days)
def generate_shipments(subscription_id): subscription = subscriptionServices.get_one_db(subscription_id) if len(subscription.shipments) < 1: subscriptionServices.generate_shipments(subscription) week_days = get_week_names() return render_template('/subscriptions/subscription.html', subscription=subscription, week_days=week_days)
def subscription(subscription_id): subscription = subscriptionServices.get_one(subscription_id) week_days = get_week_names() return render_template('/subscriptions/subscription.html', subscription=subscription, week_days=week_days)