From f77137eed6e58139cece64e63022c6a13673ae1b Mon Sep 17 00:00:00 2001 From: sqozz Date: Sun, 25 Jan 2015 06:11:06 +0100 Subject: [PATCH] Changed the landingpage after a new short-request was successfull --- templates/new_paste.html | 2 -- templates/short_completed.html | 24 ++++++++++++++++++++++++ urlshort.db | Bin 41984 -> 41984 bytes urlshort.py | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) delete mode 100644 templates/new_paste.html create mode 100644 templates/short_completed.html 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 57aceec7e4f8cf548ecdd5d0c40e01ee9eb3667d..fa7465191d31f31d4646d29612db81148dd925c5 100644 GIT binary patch delta 1719 zcmaje$xjne90%}uZ(3WV2rlev#ifW$XYEjAX@SzxvKYl!NK6o^Kv>F-CMMN5@hq8m z^orUVQ!b)es12n)zfp{e9>6-uyaG59rea`m(<4iy#PX z>~OO~-1V8{%e(2fqPtd1vkOAA?QzIdOlQLmT@-7q-t3lZ$x-^9{p4|q0wr_V-=*~x zPRcG^&3YRClzTQwOdv5bMkdHq*6r&g_H>&wyV&uHUPodEK7g|@1s|Sf_t+p~!vAO} z7j8V z*aN%a4cKJ|dRlu%aXtbQFb;=d3`XG)jKD!SU^n#r$l#Ph5jvm~<`?C{xf_CT0Cb!>ee5rx8unyM42G|IjU^8riUU(6x_QOM;{_#kyh8R{H+aR`#?WH_(F!dX^jlrLLYD7NsD~X;M0VQa%H4XB> z#K6|nOp$;YWE}>0U{oHPPq08H_dhN?U1>pH+~@kDxI?J2;U*n3y1v0tFUifIy6~?SIhn z0&#F4z~E#8m&pZXAPh_l#Kgp@lW}k|3=F(}hx@tbo^x{VO-|twg-euTwP#AHl(%ee z>2l9YIXj*|vh0Yp=_ORe4Qj`<*`t=(_OI%|xt9z2ECtD$zkyi27b=x7!T4=RzmuFY z_0G7IOG$S=er(Pc9=5XZ@|w)K{bD0kiY zIE@0{V*_hgK^C)^!89iD2IF{zLG+>vNkkDw9c)1E8zmN-pHPe3Mi8 zDqrM4KFgkaGny5NgNkj#H8nbL=WYY-U(}?KiqZS10Uv92LJ#7 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)