Commit 3ed898cc authored by Emanuele Santoro's avatar Emanuele Santoro

fix

parent bbc2e93f
......@@ -14,12 +14,12 @@ def page(path) :
return page_cache[path]
@mush.route("/")
@musho.route("/")
def index() :
return page("templates/index.html")
#return open("views/index.html", "r").read()
@mush.route("/save", methods=['POST'])
@musho.route("/save", methods=['POST'])
def saveLink() :
url = request.form["url"]
hash = hashlib.new('sha1')
......@@ -34,7 +34,7 @@ def saveLink() :
return render_template('shortened_link.html', url=full_url)
@mush.route("/l/<string:link_id>")
@musho.route("/l/<string:link_id>")
def resolveLink(link_id):
if link_id in links :
url = links[link_id]
......@@ -45,11 +45,9 @@ def resolveLink(link_id):
if __name__ == "__main__" :
debug = os.getenv("DEBUG", None)
if debug is not None :
mush.debug = True
musho.debug = True
port = 9000
try :
port = int(os.getenv("PORT", "9000"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment