From 44e46135a6d1cc2e1fab23c6aae96f161f50a6d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Sun, 4 Jun 2023 02:57:16 +0200 Subject: [PATCH] Chapter 9 --- app.db | Bin 36864 -> 36864 bytes app/routes.py | 86 +++++++++++++++++++++++++++++++-------- app/templates/index.html | 8 +++- app/templates/user.html | 6 +++ config.py | 1 + 5 files changed, 84 insertions(+), 17 deletions(-) diff --git a/app.db b/app.db index 3162060f51e74f807ddfb56ebc6178f27a6eb4ee..c26fc240ac3692a8e59bf1b3fb05ad51d3c8e848 100644 GIT binary patch delta 753 zcmZuuO=}ZT6rGosX>1^KZ3L+w$fOi0g~T`WJ~D|=j8Rl1xX>15`m3Hg|k#z4AB zyKoyS^9Q=f!c|ea@51~77t)1`fLm!-g5b&*g&Nzu`xcLP&f%VO@6LW?XFsxc10B4( zSwsgPUk~rZaiXUgOU5YCJ6yP2PxNk4T*qAZEM>Jz~&DlCUcCzmBTo7gl>M4B*@ki6W*|Tbh1T; zT3K#6m_&6gT|kdzqY;=BZ!(pLC*tQ6WHLcZ4V+py>;{8m3|2Jw1|t~4Td2SzSW$VC z(7%NX=$v*cS8OJH=6r4@eCAc30Z$o=PGA%cg6rX@{(ZHz6AgaB4>(cI#&AW)7$F>q NMlhPkQH1AF>sEa_ z`O6siukx?pF9V8a@J}ww?*oc0Vc>tnf0%y>P;46iWQ}^>$ {% endif %} {% for post in posts %} - {% include "_post.html" %} + {% include '_post.html' %} {% endfor %} + {% if prev_url %} + Newer posts + {% endif %} + {% if next_url %} + Older posts + {% endif %} {% endblock %}s diff --git a/app/templates/user.html b/app/templates/user.html index 89e2471..99dda35 100644 --- a/app/templates/user.html +++ b/app/templates/user.html @@ -41,4 +41,10 @@ {% for post in posts %} {% include '_post.html' %} {% endfor %} + {% if prev_url %} + Newer posts + {% endif %} + {% if next_url %} + Older posts + {% endif %} {% endblock %} diff --git a/config.py b/config.py index 6bed8d8..593c849 100644 --- a/config.py +++ b/config.py @@ -15,3 +15,4 @@ class Config(object): MAIL_USERNAME = os.environ.get("MAIL_USERNAME") MAIL_PASSWORD = os.environ.get("MAIL_PASSWORD") ADMINS = ["your-email@example.com"] + POSTS_PER_PAGE = 25