4
0
Fork 2
mirror of https://gerrit.hackerspace.pl/hscloud synced 2024-10-18 10:07:45 +00:00
hscloud/bgpwtf/landing/main.py
Sergiusz Bazanski be89707ce1 bgpwtf/landing: import
This imports a snapshot of the current landing page (that used to be
versioned in a separate repository, but we want to pull into hscloud).

Change-Id: Ia98bca294ae64bfd57c4a4250d7d3a5a7e5f8145
2020-07-25 12:18:59 +02:00

37 lines
1.1 KiB
Python

import jinja2
import webapp2
import os
JINJA_ENVIRONMENT = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),
extensions=['jinja2.ext.autoescape'],
autoescape=True)
class LandingPage(webapp2.RequestHandler):
def get(self):
template_values = {}
template = JINJA_ENVIRONMENT.get_template('index.html')
self.response.write(template.render(template_values))
class Camp19Page(webapp2.RequestHandler):
def get(self):
self.redirect('https://events.ccc.de/camp/2019/wiki/Village:IXP')
class PricingPage(webapp2.RequestHandler):
def get(self):
template_values = {}
template = JINJA_ENVIRONMENT.get_template('pricing.html')
self.response.write(template.render(template_values))
app = webapp2.WSGIApplication([
('/', LandingPage),
('/cccamp19', Camp19Page),
('/ccccamp19', Camp19Page),
('/camp19', Camp19Page),
('/camp', Camp19Page),
('/cccamp', Camp19Page),
('/ccccamp', Camp19Page),
('/pricing', PricingPage),
('/prices', PricingPage),
('/price', PricingPage),
], debug=False)