Add license to webpage
This commit is contained in:
parent
e6db44dc17
commit
084df3e881
4
main.py
4
main.py
|
@ -26,6 +26,7 @@ app = Flask(__name__)
|
|||
@app.route("/", methods=["GET", "POST"])
|
||||
def index():
|
||||
global POLYNOMIAL, LAST_ENDPOINT_GET, DAYS_TO_ALLOW
|
||||
try:
|
||||
if request.method == "POST":
|
||||
if ALIVE_PATH and DAYS_TO_ALLOW and LAST_ENDPOINT_GET and (datetime.today() - LAST_ENDPOINT_GET).days < DAYS_TO_ALLOW:
|
||||
return render_template("message.html", message="Andrew is still alive. Try again another time")
|
||||
|
@ -47,6 +48,9 @@ def index():
|
|||
return render_template("message.html", message="Invalid data")
|
||||
captcha = captcha_get(ttl = 300)
|
||||
return render_template("index.html", polynomial = POLYNOMIAL, domain=DOMAIN, captcha_id = captcha[0], captcha_png = captcha[1])
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return render_template('message.html', message="Error ocurred")
|
||||
|
||||
@app.route("/<attempt_num>", methods=["GET", "POST"])
|
||||
def attempt(attempt_num):
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<p>Once you get the value of f(0), go to {{ domain }}/f(0)</p>
|
||||
|
||||
<hr />
|
||||
<p>Here's resources with more information (for now, just contact info for others with a coordinate). Password should've been given to you</p>
|
||||
<p>Here's resources with more information. Password should've been given to you</p>
|
||||
|
||||
<ul>
|
||||
<li><a target="_blank" rel="noopener noreferrer" href="https://nextcloud.andrewkdinh.com/s/ADmFKLCZgdycRH8">Nextcloud</a></li>
|
||||
|
@ -58,5 +58,8 @@
|
|||
<li><a target="_blank" rel="noopener noreferrer" href="https://www.wolframalpha.com/input/?i=interpolating+polynomial+calculator">WolframAlpha</a></li>
|
||||
<li><a target="_blank" rel="noopener noreferrer" href="https://planetcalc.com/8692/">PlanetCalc</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Source code available on <a target="_blank" rel="noopener noreferrer" href="https://github.com/andrewkdinh/death-code">GitHub</a> and <a target="_blank" rel="noopener noreferrer" href="https://gitea.andrewkdinh.com/andrewkdinh/death-code">Gitea</a></p>
|
||||
<p>Licensed under <a target="_blank" rel="noopener noreferrer" href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL 3.0</a></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue