diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..11a5d8e
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+main.py
\ No newline at end of file
diff --git a/.idea/CNA340_FinalProject.iml b/.idea/CNA340_FinalProject.iml
index 86bd522..7eb1baf 100644
--- a/.idea/CNA340_FinalProject.iml
+++ b/.idea/CNA340_FinalProject.iml
@@ -4,10 +4,7 @@
-
+
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..1c03b68
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index a31d283..d56657a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 61919bd..4a391c8 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,10 +1,7 @@
-
-
-
-
+
@@ -24,52 +21,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
registerationForm
@@ -90,6 +41,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -123,6 +85,7 @@
+
@@ -153,21 +116,18 @@
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
@@ -213,14 +173,14 @@
-
+
-
+
@@ -228,7 +188,7 @@
-
+
@@ -282,16 +242,20 @@
-
+
+
+
+
+
@@ -333,6 +297,30 @@
+
+
+
+
+
+
diff --git a/SOW_Final_Project Complete.pdf b/SOW_Final_Project Complete.pdf
new file mode 100644
index 0000000..4c1b469
Binary files /dev/null and b/SOW_Final_Project Complete.pdf differ
diff --git a/main.py b/main.py
index 67fb91b..509e01a 100644
--- a/main.py
+++ b/main.py
@@ -33,16 +33,16 @@ def root():
logged_in, first_name, no_of_items = get_login_details()
with sqlite3.connect('database.db') as conn:
cur = conn.cursor()
- # Show last product added
+ #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')
+ #Show all items
+ cur.execute('SELECT productId, name, price, description, image, stock FROM products LIMIT 3')
item_data = cur.fetchall()
- # Show an error instead of the categories
- category_data = [(-1,"Error")]
+ #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)
@@ -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():