Exemple #1
0
    def GET(self):
        shortener = Shortener()
        input_params = web.input()
        data = {}
        if 'url' in input_params:
            url = input_params.url
            links = Links(server_name)

            shorted_url = shortener.short_it(url)
            links.add_link('url', param =shorted_url)
            links.add_link('statistic', param =shorted_url)
            links.add_link('qrcode', param = shorted_url)
            for element in links.get_links():
                data[element['link']] = element['url']
        data['menu'] = helper.main_menu()
        return render.main(params = data)
Exemple #2
0
 def GET(self):
     data = {}
     data['menu'] = helper.main_menu()        
     return render.about(params = data)