]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/web/__init__.py
location: Create a page that explains how to report problems
[ipfire.org.git] / src / web / __init__.py
index 0ea16fcd8080aa0e5e57329cf8be45f1f0349e1d..dfc72eaa1212e30f246913f2dc7d6bc99ebb17d1 100644 (file)
@@ -175,6 +175,17 @@ class Application(tornado.web.Application):
                        (r"/donate/error", donate.ErrorHandler),
                        (r"/donate/check-vat-number", donate.CheckVATNumberHandler),
 
+                       # Fireinfo
+                       (r"/fireinfo/?", fireinfo.IndexHandler),
+                       (r"/fireinfo/admin", fireinfo.AdminIndexHandler),
+                       (r"/fireinfo/vendors", fireinfo.VendorsHandler),
+                       (r"/fireinfo/vendors/(pci|usb)/([0-9a-f]{4})", fireinfo.VendorHandler),
+                       (r"/fireinfo/drivers/(.*)", fireinfo.DriverDetail),
+                       (r"/fireinfo/profile/random", fireinfo.RandomProfileHandler),
+                       (r"/fireinfo/profile/([a-z0-9]{40})", fireinfo.ProfileHandler),
+                       (r"/fireinfo/processors", fireinfo.ProcessorsHandler),
+                       (r"/fireinfo/releases", fireinfo.ReleasesHandler),
+
                        # Lists
                        (r"/lists", lists.IndexHandler),
 
@@ -183,11 +194,16 @@ class Application(tornado.web.Application):
                        (r"/password\-reset/([a-z_][a-z0-9_-]{0,31})/(\w+)", auth.PasswordResetHandler),
                        (r"/.well-known/change-password", auth.WellKnownChangePasswordHandler),
 
-                       # Projects
-                       (r"/projects/location/?", location.IndexHandler),
-                       (r"/projects/location/download", StaticHandler, { "template" : "location/download.html" }),
-                       (r"/projects/location/how\-to\-use", StaticHandler, { "template" : "location/how-to-use.html" }),
-                       (r"/projects/location/lookup/(.+)", location.LookupHandler),
+                       # Location
+                       (r"/location/?", StaticHandler, { "template" : "location/index.html" }),
+                       (r"/location/download", tornado.web.RedirectHandler, { "url" : "/location/install" }),
+                       (r"/location/how\-to\-use", StaticHandler, { "template" : "location/how-to-use/index.html" }),
+                       (r"/location/how\-to\-use/cli", StaticHandler, { "template" : "location/how-to-use/cli.html" }),
+                       (r"/location/how\-to\-use/dns", StaticHandler, { "template" : "location/how-to-use/dns.html" }),
+                       (r"/location/how\-to\-use/python", StaticHandler, { "template" : "location/how-to-use/python.html" }),
+                       (r"/location/install", StaticHandler, { "template" : "location/install.html" }),
+                       (r"/location/report\-a\-problem", StaticHandler, { "template" : "location/report-a-problem.html" }),
+                       (r"/location/lookup/(.+)", location.LookupHandler),
 
                        # Single-Sign-On for Discourse
                        (r"/sso/discourse", auth.SSODiscourse),
@@ -231,6 +247,7 @@ class Application(tornado.web.Application):
                        (r"/imprint", tornado.web.RedirectHandler, { "url" : "/legal" }),
                        (r"/news.rss", tornado.web.RedirectHandler, { "url" : "/blog/feed.xml" }),
                        (r"/news/(.*)", tornado.web.RedirectHandler, { "url" : "/blog/{0}" }),
+                       (r"/projects(/.*)", tornado.web.RedirectHandler, { "url" : "{0}" }),
                        (r"/support", tornado.web.RedirectHandler, { "url" : "/help"}),
                        (r"/(de|en)/(.*)", tornado.web.RedirectHandler, { "url" : "/{0}"}),
 
@@ -279,32 +296,12 @@ class Application(tornado.web.Application):
 
                # fireinfo.ipfire.org
                self.add_handlers(r"fireinfo\.([a-z]+\.dev\.)?ipfire\.org", [
-                       (r"/", fireinfo.IndexHandler),
-
-                       # Admin
-                       (r"/admin", fireinfo.AdminIndexHandler),
-
-                       # Vendors
-                       (r"/vendors", fireinfo.VendorsHandler),
-                       (r"/vendors/(pci|usb)/([0-9a-f]{4})", fireinfo.VendorHandler),
-
-                       # Driver
-                       (r"/drivers/(.*)", fireinfo.DriverDetail),
-
-                       # Show profiles
-                       (r"/profile/random", fireinfo.RandomProfileHandler),
-                       (r"/profile/([a-z0-9]{40})", fireinfo.ProfileHandler),
-
-                       # Stats
-                       (r"/processors", fireinfo.ProcessorsHandler),
-                       (r"/releases", fireinfo.ReleasesHandler),
-
-                       # Send profiles
+                       # Handle profiles
                        (r"/send/([a-z0-9]+)", fireinfo.ProfileSendHandler),
 
-                       # Serve any static files
-                       (r"/static/(.*)", tornado.web.StaticFileHandler, { "path" : self.settings.get("static_path") }),
-               ] + authentication_handlers)
+                       # Redirect anything else
+                       (r"(.*)", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/fireinfo{0}" }),
+               ])
 
                # i-use.ipfire.org
                self.add_handlers(r"i-use\.([a-z]+\.dev\.)?ipfire\.org", [
@@ -330,6 +327,9 @@ class Application(tornado.web.Application):
                # nopaste.ipfire.org
                self.add_handlers(r"nopaste\.([a-z]+\.dev\.)?ipfire\.org", [
                        (r"/", nopaste.CreateHandler),
+                       (r"/upload", nopaste.UploadHandler),
+
+                       # View
                        (r"/raw/(.*)", nopaste.RawHandler),
                        (r"/view/(.*)", nopaste.ViewHandler),
 
@@ -339,7 +339,7 @@ class Application(tornado.web.Application):
 
                # location.ipfire.org
                self.add_handlers(r"location\.([a-z]+\.dev\.)?ipfire\.org", [
-                       (r"(.*)", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/projects/location{0}" }),
+                       (r"(.*)", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/location{0}" }),
                ])
 
                # geoip.ipfire.org