Commit e11515d8 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Fixed short url display bug.

parent 6d742a13
......@@ -7,6 +7,9 @@
# doc_root: Describes where the website's root directory is.
doc_root = "/srv/http"
# domain: This is the domain the website is being hosted at.
domain = "go.gmu.edu"
##############################
......
......@@ -115,13 +115,14 @@ def application(environ, start_response):
if not (INV_LU or INV_SU or SU_TS or SU_EX):
# insert the longurl-shorturl pairing in the database.
library.register_url( long_url, short_url, end_stamp )
display_short = goconfig.domain + "/" + short_url
body.append(
'<p><em>Original URL:</em> <a href="%s">%s</a></p>' %
(long_url, long_url))
body.append(
'<p><em>Shortened URL:</em> <a href="/%s">%s</a></p>' %
(short_url, short_url))
(short_url, display_short))
else:
body.append(
'<input type="submit" value="BACK" ' +
......
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