diff --git a/Listing_10.10.py b/Listing_10.10.py deleted file mode 100644 index 340c61e..0000000 --- a/Listing_10.10.py +++ /dev/null @@ -1,24 +0,0 @@ -import os -from flask import Flask, render_template - -def create_app(test_config=None): - """Create and configure the app.""" - app = Flask(__name__, instance_relative_config=True) - . - . - . - @app.route("/") - def index(): - return render_template("index.html") - - @app.route("/about") - def about(): - return render_template("about.html") - - @app.route("/palindrome") - def palindrome(): - return render_template("palindrome.html") - - return app - -app = create_app() diff --git a/Listing_10.11.html b/Listing_10.11.html deleted file mode 100644 index 3e892dd..0000000 --- a/Listing_10.11.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - Learn Enough Python Sample App - - - - - -
-
- -

Sample Flask App

- -

- This is the sample Flask app for - Learn Enough Python - to Be Dangerous. Learn more on the About page. -

- -

- Click the Sator - Square below to run the custom Palindrome - Detector. -

- - - Sator Square - -
-
- - diff --git a/Listing_10.14.py b/Listing_10.14.py deleted file mode 100644 index e808d40..0000000 --- a/Listing_10.14.py +++ /dev/null @@ -1,10 +0,0 @@ -% import os -% from flask import Flask - -% def create_app(test_config=None): -% """Create and configure the app.""" -% app = Flask(__name__, instance_relative_config=True, -% static_url_path="/static") -% . -% . -% . diff --git a/Listing_10.15.html b/Listing_10.15.html deleted file mode 100644 index 26c826e..0000000 --- a/Listing_10.15.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Learn Enough Python Sample App - - - - - -
-
- -
-
- - diff --git a/Listing_10.16.txt b/Listing_10.16.txt deleted file mode 100644 index 922fb8f..0000000 --- a/Listing_10.16.txt +++ /dev/null @@ -1 +0,0 @@ -$ pip install -e . diff --git a/Listing_10.17.py b/Listing_10.17.py deleted file mode 100644 index 32e7b02..0000000 --- a/Listing_10.17.py +++ /dev/null @@ -1,11 +0,0 @@ -def test_index(client): - response = client.get("/") - assert response.status_code == 200 - -def test_about(client): - response = client.get("/about") - assert response.status_code == 200 - -def test_palindrome(client): - response = client.get("/palindrome") - assert response.status_code == 200 diff --git a/Listing_10.18.txt b/Listing_10.18.txt deleted file mode 100644 index c8a9871..0000000 --- a/Listing_10.18.txt +++ /dev/null @@ -1,7 +0,0 @@ -(venv) $ pytest -============================= test session starts ============================== -collected 3 items - -tests/test_site_pages.py ... [100%] - -============================== 3 passed in 0.01s =============================== diff --git a/Listing_10.21.html b/Listing_10.21.html deleted file mode 100644 index 3e73ccd..0000000 --- a/Listing_10.21.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Learn Enough Python Sample App - - - - - -
-
- {% block content %}{% endblock %} -
-
- - diff --git a/Listing_10.22.html b/Listing_10.22.html deleted file mode 100644 index c7039e8..0000000 --- a/Listing_10.22.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "layout.html" %} - -{% block content %} -

Sample Flask App

- -

- This is the sample Flask app for - Learn Enough Python - to Be Dangerous. Learn more on the About page. -

- -

- Click the Sator - Square below to run the custom Palindrome - Detector. -

- - - Sator Square - -{% endblock %} diff --git a/Listing_10.25.txt b/Listing_10.25.txt deleted file mode 100644 index c8a9871..0000000 --- a/Listing_10.25.txt +++ /dev/null @@ -1,7 +0,0 @@ -(venv) $ pytest -============================= test session starts ============================== -collected 3 items - -tests/test_site_pages.py ... [100%] - -============================== 3 passed in 0.01s =============================== diff --git a/Listing_10.26.py b/Listing_10.26.py deleted file mode 100644 index 6a720a5..0000000 --- a/Listing_10.26.py +++ /dev/null @@ -1,23 +0,0 @@ -def test_index(client): - response = client.get("/") - assert response.status_code == 200 - base_title = "Learn Enough Python Sample App" - title = f"{base_title}" - assert title in response.text - assert "

" in response.text - -def test_about(client): - response = client.get("/about") - assert response.status_code == 200 - base_title = "Learn Enough Python Sample App" - title = f"{base_title}" - assert title in response.text - assert "

" in response.text - -def test_palindrome(client): - response = client.get("/palindrome") - assert response.status_code == 200 - base_title = "Learn Enough Python Sample App" - title = f"{base_title}" - assert title in response.text - assert "

" in response.text diff --git a/Listing_10.31.html b/Listing_10.31.html deleted file mode 100644 index 87e1e77..0000000 --- a/Listing_10.31.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Learn Enough Python Sample App | {{ page_title }} - . - . - . diff --git a/Listing_10.32.txt b/Listing_10.32.txt deleted file mode 100644 index c8a9871..0000000 --- a/Listing_10.32.txt +++ /dev/null @@ -1,7 +0,0 @@ -(venv) $ pytest -============================= test session starts ============================== -collected 3 items - -tests/test_site_pages.py ... [100%] - -============================== 3 passed in 0.01s =============================== diff --git a/Listing_10.34.py b/Listing_10.34.py deleted file mode 100644 index 58b21c5..0000000 --- a/Listing_10.34.py +++ /dev/null @@ -1,24 +0,0 @@ -def test_index(client): - response = client.get("/") - assert response.status_code == 200 - base_title = "Learn Enough Python Sample App" - title = f"{base_title} | Home" - assert title in response.text - assert "

" in response.text - assert "