]> git.ipfire.org Git - ipfire.org.git/commitdiff
about: Move the page into the static handler
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 26 Jun 2023 10:16:31 +0000 (10:16 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 26 Jun 2023 10:16:31 +0000 (10:16 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/static/about.html [moved from src/templates/about.html with 99% similarity]
src/web/__init__.py
src/web/handlers.py

index 6f898a253db3c65b2af34a300946ed2bedabc2e1..a95a0344660bb0fc6f6726e885ffe1b387dce45d 100644 (file)
@@ -103,7 +103,6 @@ webdir = $(backenddir)/web
 # TODO install the base for now and add all other templates later
 
 templates_DATA = \
-       src/templates/about.html \
        src/templates/base.html \
        src/templates/error.html \
        src/templates/index.html
@@ -290,6 +289,7 @@ templates_people_modules_DATA = \
 templates_people_modulesdir = $(templates_peopledir)/modules
 
 templates_static_DATA = \
+       src/templates/static/about.html \
        src/templates/static/legal.html \
        src/templates/static/help.html
 
similarity index 99%
rename from src/templates/about.html
rename to src/templates/static/about.html
index 273f818b7b1b5606870b08511371d94215292079..0e2fe9480bc51691908c9de0128d04006910c9c4 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "../base.html" %}
 
 {% block title %}{{ _("About IPFire") }}{% end block %}
 
index c1aaf53b7ac404b9a15b42c7dff89a96c00c462a..c2b749abedb828983031d69529c095c0444d654e 100644 (file)
@@ -115,7 +115,6 @@ class Application(tornado.web.Application):
                self.add_handlers(r"(www\.)?([a-z]+\.dev\.)?ipfire\.org", [
                        # Entry site that lead the user to index
                        (r"/", IndexHandler),
-                       (r"/about", AboutHandler),
 
                        # Authentication
                        (r"/login", auth.LoginHandler),
@@ -175,6 +174,7 @@ class Application(tornado.web.Application):
                        (r"/news/(.*)", handlers.NewsHandler),
 
                        # Static Pages
+                       (r"/about",  StaticHandler, { "template" : "about.html" }),
                        (r"/legal", StaticHandler, { "template" : "legal.html" }),
                        (r"/help", StaticHandler, { "template" : "help.html" }),
 
index 8bbfadc52cecaf680edc314143e5267e53bbde58..e79e647c25e8f7f703c870f659f10ac27b804eb8 100644 (file)
@@ -26,14 +26,6 @@ class IndexHandler(base.BaseHandler):
                return self.render("index.html", latest_release=latest_release)
 
 
-class AboutHandler(base.BaseHandler):
-       def get(self):
-               # Cache page for a day
-               self.set_expires(3600 * 24)
-
-               self.render("about.html")
-
-
 class NewsHandler(base.BaseHandler):
        def get(self, post):
                self.redirect("https://www.ipfire.org/blog/%s" % post, permanent=True)