From a7b52593d1bc4d3354e4ef89e8830f3177f038e0 Mon Sep 17 00:00:00 2001 From: Lucas Jensen Date: Sat, 1 Oct 2022 17:44:43 -0700 Subject: [PATCH] specified port --- main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index ac14dc5..963075f 100644 --- a/main.py +++ b/main.py @@ -5,7 +5,6 @@ Last updated 5/12 for Assignment 1 """ from flask import Flask, redirect, render_template, request, send_file from recipe import Recipe, RecipeBook -from werkzeug.utils import secure_filename from time import sleep import subprocess import os @@ -90,12 +89,16 @@ def recipe_page(_id): if get_num(photo) == int(_id): recipe_photos.append(photo) - return render_template("recipe.html", content=recipe, _id=_id, photos=recipe_photos) + return render_template("recipe.html", + content=recipe, + _id=_id, + photos=recipe_photos) def get_num(path: str) -> int: """ - :param path: must be formatted: "image_XXX.jpg" where XXX is the id of the recipe with any number of digits + :param path: must be formatted: "image_XXX.jpg" where XXX is the id of the + recipe with any number of digits :return: integer of the found id number """ num = "" @@ -140,4 +143,4 @@ def add_recipe(): if __name__ == "__main__": - app.run(debug=True) + app.run(debug=False, port=5001)