Spaces:
Running
Running
Michael Natanael
commited on
Commit
·
bc3627b
1
Parent(s):
3bd6668
Set timezone to asia/jakarta
Browse files- Dockerfile +4 -0
- app.py +1 -1
- templates/index.html +8 -3
Dockerfile
CHANGED
@@ -8,6 +8,10 @@ FROM python:3.9
|
|
8 |
# ENV NUMEXPR_NUM_THREADS=4
|
9 |
# ENV MKL_NUM_THREADS=4
|
10 |
|
|
|
|
|
|
|
|
|
11 |
RUN apt update
|
12 |
RUN apt --yes install ffmpeg
|
13 |
|
|
|
8 |
# ENV NUMEXPR_NUM_THREADS=4
|
9 |
# ENV MKL_NUM_THREADS=4
|
10 |
|
11 |
+
# Set timezone
|
12 |
+
ENV TZ=Asia/Jakarta
|
13 |
+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
14 |
+
|
15 |
RUN apt update
|
16 |
RUN apt --yes install ffmpeg
|
17 |
|
app.py
CHANGED
@@ -373,7 +373,7 @@ def login():
|
|
373 |
|
374 |
def dashboard(login_alert=False):
|
375 |
if login_alert:
|
376 |
-
|
377 |
return redirect(url_for("index"))
|
378 |
|
379 |
|
|
|
373 |
|
374 |
def dashboard(login_alert=False):
|
375 |
if login_alert:
|
376 |
+
flash(current_user.email, "success")
|
377 |
return redirect(url_for("index"))
|
378 |
|
379 |
|
templates/index.html
CHANGED
@@ -6,8 +6,11 @@
|
|
6 |
|
7 |
{% block body %}
|
8 |
{% include 'navbar.html' %}
|
9 |
-
{%
|
10 |
-
|
|
|
|
|
|
|
11 |
role="alert">
|
12 |
<div class="inline-flex items-center justify-center shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg">
|
13 |
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
@@ -17,7 +20,7 @@
|
|
17 |
</svg>
|
18 |
<span class="sr-only">Check icon</span>
|
19 |
</div>
|
20 |
-
<div class="ms-3 text-sm font-normal">You are logged in as <b>{{ email }}</b>!</div>
|
21 |
<button type="button"
|
22 |
class="ms-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8"
|
23 |
data-dismiss-target="#toast-success" aria-label="Close">
|
@@ -28,7 +31,9 @@
|
|
28 |
</svg>
|
29 |
</button>
|
30 |
</div>
|
|
|
31 |
{% endif %}
|
|
|
32 |
<main class="flex flex-row justify-center items-center min-h-screen">
|
33 |
<div class="container flex flex-col justify-center items-center">
|
34 |
<h1 class="mb-4 text-5xl font-extrabold tracking-tight text-slate-900 sm:text-7xl text-center">Indonesian Lyrics
|
|
|
6 |
|
7 |
{% block body %}
|
8 |
{% include 'navbar.html' %}
|
9 |
+
{% with messages = get_flashed_messages(with_categories=true) %}
|
10 |
+
{% if messages %}
|
11 |
+
{% for category, message in messages %}
|
12 |
+
<div id="toast-success"
|
13 |
+
class="fixed top-2 left-1/2 transform -translate-x-1/2 z-50 flex items-center w-full max-w-xs p-4 mb-4 text-gray-500 bg-white rounded-lg shadow-sm"
|
14 |
role="alert">
|
15 |
<div class="inline-flex items-center justify-center shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg">
|
16 |
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
|
|
20 |
</svg>
|
21 |
<span class="sr-only">Check icon</span>
|
22 |
</div>
|
23 |
+
<div class="ms-3 text-sm font-normal">You are logged in as <b>{{ current_user.email }}</b>!</div>
|
24 |
<button type="button"
|
25 |
class="ms-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8"
|
26 |
data-dismiss-target="#toast-success" aria-label="Close">
|
|
|
31 |
</svg>
|
32 |
</button>
|
33 |
</div>
|
34 |
+
{% endfor %}
|
35 |
{% endif %}
|
36 |
+
{% endwith %}
|
37 |
<main class="flex flex-row justify-center items-center min-h-screen">
|
38 |
<div class="container flex flex-col justify-center items-center">
|
39 |
<h1 class="mb-4 text-5xl font-extrabold tracking-tight text-slate-900 sm:text-7xl text-center">Indonesian Lyrics
|