Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
e11515d8
Commit
e11515d8
authored
Oct 06, 2013
by
Jean Michel Rouly
Browse files
Fixed short url display bug.
parent
6d742a13
Changes
2
Hide whitespace changes
Inline
Side-by-side
wsgi/goconfig.py
View file @
e11515d8
...
...
@@ -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"
##############################
...
...
wsgi/url-register.py
View file @
e11515d8
...
...
@@ -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" '
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment