diff --git a/shop.py b/shop.py index c9fbf5e..7dc7f06 100644 --- a/shop.py +++ b/shop.py @@ -67,7 +67,6 @@ def index(): @app.route('/post', methods=['POST']) def handle_data(): - pprint(request.form) if "addValue" in request.form: for x in request.form: # print(x) diff --git a/templates/addForm.html b/templates/addForm.html new file mode 100644 index 0000000..88097bf --- /dev/null +++ b/templates/addForm.html @@ -0,0 +1,7 @@ +
+ Name:
+
+ Item:
+

+ +
\ No newline at end of file diff --git a/templates/auth.html b/templates/auth.html index 3f75c0e..93307b5 100644 --- a/templates/auth.html +++ b/templates/auth.html @@ -1,12 +1,4 @@ - - - - Shopping List - - - - - + {% include "header.html" %}

{{ data["title"] }}

diff --git a/templates/header.html b/templates/header.html new file mode 100644 index 0000000..db08c1f --- /dev/null +++ b/templates/header.html @@ -0,0 +1,9 @@ + + + + Shopping List + + + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 2c3b0c9..4ba6f15 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,52 +1,12 @@ - - - - This is my site - - - - - +{% include "header.html" %}

{{ data["title"] }}

+ {% include "addForm.html" %} +
- - - - - - - - - {% for x in data["results"] %} - - - - - - - - {% endfor %} -
ItemRequesterGottem?Remove
{{x[1]}}{{x[4]}} {% if x[3] == 0 %} -
- {% else %} - yes - {% endif %}
- -
-
- + {% include "list.html" %}
- diff --git a/templates/list.html b/templates/list.html new file mode 100644 index 0000000..3ab6a88 --- /dev/null +++ b/templates/list.html @@ -0,0 +1,25 @@ + + + + + + + + +{% for x in data["results"] %} + + + + + + + +{% endfor %} +
ItemRequesterGottem?Remove
{{x[1]}}{{x[4]}} {% if x[3] == 0 %} +
+ {% else %} + yes + {% endif %}
+ +
+
\ No newline at end of file diff --git a/templates/mobile.html b/templates/mobile.html index 52dd24f..1afd8ce 100644 --- a/templates/mobile.html +++ b/templates/mobile.html @@ -1,47 +1,11 @@ - - - - Shopping List - - - - - +{% include "header.html" %}

{{ data["title"] }}

-
- Name:
- Item:

- -
+ {% include "addForm.html" %}
- - - - - - - - - {% for x in data["results"] %} - - - - - - - - {% endfor %} -
ItemRequesterGottem?Remove
{{x[1]}}{{x[4]}} {% if x[3] == 0 %} -
- {% else %} - yes - {% endif %}
- -
-
+ {% include "list.html" %}