Jinja2 Mastery: Level 1: Routing between pages with Jinja (+43, -0)

signup.html (+6, -0)

From: curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/signup.html

To: curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/signup.html

            
            new file mode 100644
index 0000000..876867d
--- /dev/null
+++ b/curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/signup.html
@@ -0,0 +1,6 @@
+{% extends 'base.html' %}
+
+{% block content %}
+<h1>This is the sign up page</h1>
+<a href="{{ url_for('login') }}">Log in instead?</a>
+{% endblock %}
        

base.html (+5, -0)

From: curriculum/section09/lectures/10_jinja_routing/start/templates/base.html

To: curriculum/section09/lectures/10_jinja_routing/end/templates/base.html

            
            index 99c9ba3..efd64cf 100644
--- a/curriculum/section09/lectures/10_jinja_routing/start/templates/base.html
+++ b/curriculum/section09/lectures/10_jinja_routing/end/templates/base.html
@@ -10,6 +10,11 @@
   {% endblock %}
 </head>
 <body>
+  <ul class="navigation">
+    <li><a href="/home">Home</a></li>
+    <li><a href="/login">Log in</a></li>
+    <li><a href="/signup">Sign up</a></li>
+  </ul>
   {% block content %}
   {% endblock %}
 </body>
        

base.html (+21, -0)

From: curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/base.html

To: curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/base.html

            
            new file mode 100644
index 0000000..82ba81e
--- /dev/null
+++ b/curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/base.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>{{ title or "Learn Jinja Routing"}}</title>
+  <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
+  {% block head %}
+  {% endblock %}
+</head>
+<body>
+  <ul class="navigation">
+    <li><a href="{{ url_for('home') }}">Home</a></li>
+    <li><a href="{{ url_for('login') }}">Log in</a></li>
+    <li><a href="{{ url_for('signup') }}">Sign up</a></li>
+  </ul>
+  {% block content %}
+  {% endblock %}
+</body>
+</html>
        

home.html (+5, -0)

From: curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/home.html

To: curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/home.html

            
            new file mode 100644
index 0000000..b410d0c
--- /dev/null
+++ b/curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/home.html
@@ -0,0 +1,5 @@
+{% extends 'base.html' %}
+
+{% block content %}
+<h1>This is the homepage.</h1>
+{% endblock %}
        

login.html (+6, -0)

From: curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/login.html

To: curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/login.html

            
            new file mode 100644
index 0000000..7e02ae5
--- /dev/null
+++ b/curriculum/section09/lectures/10_jinja_routing/end/templates_urlfor/login.html
@@ -0,0 +1,6 @@
+{% extends 'base.html' %}
+
+{% block content %}
+<h1>This is the login page.</h1>
+<a href="{{ url_for('signup') }}">Sign up instead?</a>
+{% endblock %}