add date
This commit is contained in:
parent
c45d880b8e
commit
42f8ac8a53
5
app.py
5
app.py
@ -34,6 +34,11 @@ app = Flask(__name__)
|
|||||||
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1)
|
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1)
|
||||||
app.secret_key = 'eng5iikeiwah3lae4idoo0woh4eiy6Th'
|
app.secret_key = 'eng5iikeiwah3lae4idoo0woh4eiy6Th'
|
||||||
|
|
||||||
|
@app.context_processor
|
||||||
|
def get_date():
|
||||||
|
date = datetime.now()
|
||||||
|
return { "now": date.strftime("%Y-%m-%d") }
|
||||||
|
|
||||||
@app.route('/', methods = ['GET', 'POST'])
|
@app.route('/', methods = ['GET', 'POST'])
|
||||||
def index():
|
def index():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<footer class="w3-container w3-border-top w3-light-grey w3-border-blue-grey w3-center" style="position: fixed; bottom: 0; width: 100vw; height: auto">
|
<footer class="w3-container w3-border-top w3-light-grey w3-border-blue-grey w3-center" style="position: fixed; bottom: 0; width: 100vw; height: auto">
|
||||||
{% block footer %}<div class="w3-small">{{ request.base_url }}</div>{% endblock %}
|
{% block footer %}<div class="w3-small">{{ now }} - {{ request.base_url }}</div>{% endblock %}
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
x
Reference in New Issue
Block a user