diff --git a/templates/new_paste.html b/templates/new_paste.html deleted file mode 100644 index fa314b7..0000000 --- a/templates/new_paste.html +++ /dev/null @@ -1,2 +0,0 @@ - -http://localhost:5000/{{paste_id}} diff --git a/templates/short_completed.html b/templates/short_completed.html new file mode 100644 index 0000000..7029f78 --- /dev/null +++ b/templates/short_completed.html @@ -0,0 +1,24 @@ + + + + + New paste created! + + + +
+
+ +
+
+ {{server_url}}{{paste_id}} +
+
+ + + diff --git a/urlshort.db b/urlshort.db index 57aceec..fa74651 100644 Binary files a/urlshort.db and b/urlshort.db differ diff --git a/urlshort.py b/urlshort.py index 6bf02b1..fbd815a 100644 --- a/urlshort.py +++ b/urlshort.py @@ -50,7 +50,7 @@ def paste(pasteID): def new_short(): target_url = request.args.get("target", "") 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): paste_id = gen_new_id(5)