add git_apology route rough draft and replace apology with gif_apology under differentiation route
This commit is contained in:
parent
905a6e4f54
commit
1369020b37
Binary file not shown.
6
app.py
6
app.py
|
|
@ -18,7 +18,7 @@ def differentiation():
|
|||
if request.method == "POST":
|
||||
# Check if inputs were given
|
||||
if not request.form.get("function"):
|
||||
return apology("must provide a function", 400)
|
||||
return gif_apology("must provide a function", 400)
|
||||
f = request.form.get("function")
|
||||
|
||||
# Setup our symbols for SymPy
|
||||
|
|
@ -229,6 +229,10 @@ def setup_symbols(f):
|
|||
f = f.subs(letter, x)
|
||||
return f
|
||||
|
||||
def gif_apology(message="oopsy", code=400):
|
||||
"Render gif failure"
|
||||
PATH = 'static/img/gifs/reaction' + str(2) + '.gif'
|
||||
return render_template("gif_apology.html", PATH=PATH)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 921 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.2 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 362 KiB |
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}
|
||||
Apology
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<img class="border" src={{PATH}} alt="shit" >
|
||||
{% endblock %}
|
||||
Loading…
Reference in New Issue