From: Michael Tremer Date: Tue, 2 Oct 2018 10:55:19 +0000 (+0100) Subject: download: Remove extra page which made no sense X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63e1f3a3b15f2af05aaa607faad7e7108875c98f;p=ipfire.org.git download: Remove extra page which made no sense Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 154e4113..880c5de6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -133,16 +133,10 @@ templates_blog_modulesdir = $(templates_blogdir)/modules templates_download_DATA = \ src/templates/download/base.html \ - src/templates/download/index.html \ src/templates/download/release.html templates_downloaddir = $(templatesdir)/download -templates_download_modules_DATA = \ - src/templates/download/modules/button.html - -templates_download_modulesdir = $(templates_downloaddir)/modules - templates_location_DATA = \ src/templates/location/lookup.html diff --git a/src/templates/download/index.html b/src/templates/download/index.html deleted file mode 100644 index 2e209572..00000000 --- a/src/templates/download/index.html +++ /dev/null @@ -1,34 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ _("Download") }}{% end block %} - -{% block content %} -
-
-

{{ _("Download IPFire") }}

- -

- As you download and use IPFire, the IPFire Project invites you to become - an active contributor to our community. -

- - {% module DownloadButton(release) %} - -
-
-{% end block %} diff --git a/src/templates/download/modules/button.html b/src/templates/download/modules/button.html deleted file mode 100644 index 66990d2d..00000000 --- a/src/templates/download/modules/button.html +++ /dev/null @@ -1,3 +0,0 @@ - - {{ _("%s for %s") % (release, file.arch) }} - diff --git a/src/web/__init__.py b/src/web/__init__.py index 2b1d75ea..34290829 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -48,9 +48,6 @@ class Application(tornado.web.Application): "BlogPost" : blog.PostModule, "BlogPosts" : blog.PostsModule, - # Download - "DownloadButton" : download.ButtonModule, - # Location "Map" : ui_modules.MapModule, diff --git a/src/web/download.py b/src/web/download.py index fd18a147..a4336193 100644 --- a/src/web/download.py +++ b/src/web/download.py @@ -13,7 +13,8 @@ class IndexHandler(base.BaseHandler): if not release: raise tornado.web.HTTPError(404) - self.render("download/index.html", release=release) + # Redirect to latest release page + self.redirect("/download/%s" % release.slug) class ReleaseHandler(base.BaseHandler): @@ -73,13 +74,3 @@ class FileHandler(base.BaseHandler): self.db.execute("INSERT INTO log_download(filename, mirror, country_code) \ VALUES(%s, %s, %s)", filename, mirror.id, country_code) - - -class ButtonModule(ui_modules.UIModule): - def render(self, release): - for arch in release.arches: - for file in release.get_files_by_arch(arch): - return self.render_string("download/modules/button.html", release=release, file=file) - - # return nothing - return ""