Changed the landingpage after a new short-request was successfull
This commit is contained in:
parent
cafe2539c2
commit
f77137eed6
|
@ -1,2 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<a href="http://localhost:5000/{{paste_id}}">http://localhost:5000/{{paste_id}}</a>
|
|
24
templates/short_completed.html
Normal file
24
templates/short_completed.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>New paste created!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function selectAll(id) {
|
||||||
|
document.getElementById(id).focus();
|
||||||
|
document.getElementById(id).select();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<form>
|
||||||
|
<div>
|
||||||
|
<input type="text" id="paste_url" value="{{server_url}}{{paste_id}}" onClick="selectAll('paste_url');">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="{{server_url}}{{paste_id}}">{{server_url}}{{paste_id}}</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
BIN
urlshort.db
BIN
urlshort.db
Binary file not shown.
|
@ -50,7 +50,7 @@ def paste(pasteID):
|
||||||
def new_short():
|
def new_short():
|
||||||
target_url = request.args.get("target", "")
|
target_url = request.args.get("target", "")
|
||||||
paste_id = add_redirect(target_url, 1)
|
paste_id = add_redirect(target_url, 1)
|
||||||
return render_template("new_paste.html", paste_id=paste_id)
|
return render_template("short_completed.html", paste_id=paste_id, server_url=request.host + "/")
|
||||||
|
|
||||||
def add_redirect(target_url, method_id):
|
def add_redirect(target_url, method_id):
|
||||||
paste_id = gen_new_id(5)
|
paste_id = gen_new_id(5)
|
||||||
|
|
Loading…
Reference in a new issue