sustitude flet by flask
Browse files- app/main.py +3 -1
- app/templates/base.html +9 -5
- app/templates/prestamos.html +2 -2
app/main.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import json
|
| 3 |
import uuid
|
|
@@ -211,7 +213,7 @@ def repos():
|
|
| 211 |
projects = []
|
| 212 |
if GIT_TOKEN and GIT_GROUP:
|
| 213 |
try:
|
| 214 |
-
gl = gitlab.Gitlab(
|
| 215 |
projects = gl.groups.get(GIT_GROUP).projects.list(all=True)
|
| 216 |
except: pass
|
| 217 |
return render_template('repos.html', title="Proyectos", projects=projects)
|
|
|
|
| 1 |
+
import eventlet
|
| 2 |
+
eventlet.monkey_patch()
|
| 3 |
import os
|
| 4 |
import json
|
| 5 |
import uuid
|
|
|
|
| 213 |
projects = []
|
| 214 |
if GIT_TOKEN and GIT_GROUP:
|
| 215 |
try:
|
| 216 |
+
gl = gitlab.Gitlab(GITLAB_URL, private_token=GIT_TOKEN)
|
| 217 |
projects = gl.groups.get(GIT_GROUP).projects.list(all=True)
|
| 218 |
except: pass
|
| 219 |
return render_template('repos.html', title="Proyectos", projects=projects)
|
app/templates/base.html
CHANGED
|
@@ -1,15 +1,18 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="es">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>{{ title
|
| 7 |
<link rel="icon" href="{{ url_for('static', filename='assets/favicon.png') }}">
|
| 8 |
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
| 9 |
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Outfit:wght@500;700&display=swap"
|
|
|
|
| 10 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
| 11 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js"></script>
|
| 12 |
</head>
|
|
|
|
| 13 |
<body class="dark-theme">
|
| 14 |
<nav class="navbar glass">
|
| 15 |
<div class="nav-container">
|
|
@@ -36,7 +39,7 @@
|
|
| 36 |
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
|
| 37 |
<script>
|
| 38 |
const socket = io();
|
| 39 |
-
|
| 40 |
socket.on('connect', () => {
|
| 41 |
console.log('Static Connection established');
|
| 42 |
});
|
|
@@ -51,7 +54,7 @@
|
|
| 51 |
notif.className = `notification glass ${color}`;
|
| 52 |
notif.innerHTML = `<i class="fas fa-info-circle"></i> <span>${text}</span>`;
|
| 53 |
container.appendChild(notif);
|
| 54 |
-
|
| 55 |
if ("Notification" in window && Notification.permission === "granted") {
|
| 56 |
new Notification("MAKER STATION", { body: text });
|
| 57 |
}
|
|
@@ -69,4 +72,5 @@
|
|
| 69 |
});
|
| 70 |
</script>
|
| 71 |
</body>
|
| 72 |
-
|
|
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="es">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>{{ title or "MAKERSTATION" }}</title>
|
| 8 |
<link rel="icon" href="{{ url_for('static', filename='assets/favicon.png') }}">
|
| 9 |
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
| 10 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Outfit:wght@500;700&display=swap"
|
| 11 |
+
rel="stylesheet">
|
| 12 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
| 13 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js"></script>
|
| 14 |
</head>
|
| 15 |
+
|
| 16 |
<body class="dark-theme">
|
| 17 |
<nav class="navbar glass">
|
| 18 |
<div class="nav-container">
|
|
|
|
| 39 |
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
|
| 40 |
<script>
|
| 41 |
const socket = io();
|
| 42 |
+
|
| 43 |
socket.on('connect', () => {
|
| 44 |
console.log('Static Connection established');
|
| 45 |
});
|
|
|
|
| 54 |
notif.className = `notification glass ${color}`;
|
| 55 |
notif.innerHTML = `<i class="fas fa-info-circle"></i> <span>${text}</span>`;
|
| 56 |
container.appendChild(notif);
|
| 57 |
+
|
| 58 |
if ("Notification" in window && Notification.permission === "granted") {
|
| 59 |
new Notification("MAKER STATION", { body: text });
|
| 60 |
}
|
|
|
|
| 72 |
});
|
| 73 |
</script>
|
| 74 |
</body>
|
| 75 |
+
|
| 76 |
+
</html>
|
app/templates/prestamos.html
CHANGED
|
@@ -19,7 +19,7 @@
|
|
| 19 |
<label for="hora_salida">Hora Salida</label>
|
| 20 |
<select id="hora_salida" name="hora_salida">
|
| 21 |
{% for h in range(8, 16) %}
|
| 22 |
-
<option value="{{ '%02d' % h }:00">{{ '%02d' % h }:00</option>
|
| 23 |
{% endfor %}
|
| 24 |
</select>
|
| 25 |
</div>
|
|
@@ -27,7 +27,7 @@
|
|
| 27 |
<label for="hora_retorno">Devolución Estimada</label>
|
| 28 |
<select id="hora_retorno" name="hora_retorno">
|
| 29 |
{% for h in range(8, 16) %}
|
| 30 |
-
<option value="{{ '%02d' % h }:00" {{ 'selected' if h==15 }}>{{ '%02d' % h }:00</option>
|
| 31 |
{% endfor %}
|
| 32 |
</select>
|
| 33 |
</div>
|
|
|
|
| 19 |
<label for="hora_salida">Hora Salida</label>
|
| 20 |
<select id="hora_salida" name="hora_salida">
|
| 21 |
{% for h in range(8, 16) %}
|
| 22 |
+
<option value="{{ '%02d' % h }}:00">{{ '%02d' % h }}:00</option>
|
| 23 |
{% endfor %}
|
| 24 |
</select>
|
| 25 |
</div>
|
|
|
|
| 27 |
<label for="hora_retorno">Devolución Estimada</label>
|
| 28 |
<select id="hora_retorno" name="hora_retorno">
|
| 29 |
{% for h in range(8, 16) %}
|
| 30 |
+
<option value="{{ '%02d' % h }}:00" {{ 'selected' if h==15 }}>{{ '%02d' % h }}:00</option>
|
| 31 |
{% endfor %}
|
| 32 |
</select>
|
| 33 |
</div>
|