From 34d59f13df52230c281f927ed94ae71dca39cd3e Mon Sep 17 00:00:00 2001 From: CJ-Stevens Date: Fri, 4 Jun 2021 19:19:18 -0700 Subject: [PATCH 01/18] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac939fa..4d7eea2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The code requires Python and Flask to run at minimum. Pycharm IDE is recommended ## Running ## 1. Start the server by running main.py -2. Navigate to [localhost:5000](http://localhost:5000) or [127.0.0.1:5000](http://127.0.0.1:5000) in your web browser +2. Navigate to [localhost:5000](http://localhost:5000) or [127.0.0.1:5000](http://127.0.0.1:5000) in your web browser. ## Thanks -Thanks to [Zak](https://github.com/RTCedu) for supplying the initial code. \ No newline at end of file +Thanks to [Zak](https://github.com/RTCedu) for supplying the initial code. From bcea3049f97aa24de32acf5a1f8b33553a4d0f12 Mon Sep 17 00:00:00 2001 From: rmbailey86 <82070517+rmbailey86@users.noreply.github.com> Date: Tue, 15 Jun 2021 15:48:16 -0700 Subject: [PATCH 02/18] Update main.py --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 67fb91b..51ab405 100644 --- a/main.py +++ b/main.py @@ -176,10 +176,10 @@ def update_profile(): @app.route("/loginForm") def login_form(): # Uncomment to enable logging in and registration - #if 'email' in session: + if 'email' in session: return redirect(url_for('root')) - #else: - # return render_template('login.html', error='') + else: + return render_template('login.html', error='') @app.route("/login", methods = ['POST', 'GET']) def login(): From b9d022a3a792e689b8a1a8b872f47800f7119275 Mon Sep 17 00:00:00 2001 From: CJ-Stevens Date: Tue, 15 Jun 2021 20:03:36 -0700 Subject: [PATCH 03/18] I fix category --- .idea/workspace.xml | 271 +++----------------------------------------- main.py | 6 +- 2 files changed, 17 insertions(+), 260 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 61919bd..51d2837 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,9 +2,8 @@ - + - - - - @@ -213,14 +110,11 @@ - + \ No newline at end of file diff --git a/main.py b/main.py index 51ab405..c1e5423 100644 --- a/main.py +++ b/main.py @@ -36,13 +36,13 @@ def root(): # Show last product added cur.execute('SELECT productId, name, price, description, image, stock FROM products ORDER BY productId DESC LIMIT 1 ') # Show all items - #cur.execute('SELECT productId, name, price, description, image, stock FROM products LIMIT 1') + cur.execute('SELECT productId, name, price, description, image, stock FROM products LIMIT 1') item_data = cur.fetchall() # Show an error instead of the categories category_data = [(-1,"Error")] # Show all categories - #cur.execute('SELECT categoryId, name FROM categories') - #category_data = cur.fetchall() + cur.execute('SELECT categoryId, name FROM categories') + category_data = cur.fetchall() item_data = parse(item_data) return render_template('home.html', itemData=item_data, loggedIn=logged_in, firstName=first_name, noOfItems=no_of_items, categoryData=category_data) From 4a2964b1e716c148d112e5759139a8d2b8ac6f18 Mon Sep 17 00:00:00 2001 From: Ahadjimalis Date: Tue, 15 Jun 2021 20:36:17 -0700 Subject: [PATCH 04/18] Update main.py --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index c1e5423..a5b8d13 100644 --- a/main.py +++ b/main.py @@ -36,7 +36,11 @@ def root(): # Show last product added cur.execute('SELECT productId, name, price, description, image, stock FROM products ORDER BY productId DESC LIMIT 1 ') # Show all items +<<<<<<< Updated upstream cur.execute('SELECT productId, name, price, description, image, stock FROM products LIMIT 1') +======= + cur.execute('SELECT productId, name, price, description, image, stock FROM products LIMIT 3') +>>>>>>> Stashed changes item_data = cur.fetchall() # Show an error instead of the categories category_data = [(-1,"Error")] From 5d42d06f65e1082e1b95e7e97bc07d8893d50d77 Mon Sep 17 00:00:00 2001 From: Ahadjimalis Date: Tue, 15 Jun 2021 20:37:05 -0700 Subject: [PATCH 05/18] Update workspace.xml --- .idea/workspace.xml | 58 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 51d2837..9b4d460 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -45,6 +45,26 @@ +<<<<<<< Updated upstream +======= + + + +>>>>>>> Stashed changes