diff --git a/Ouafellaoui_Imad/Templates/creer_user.html b/Ouafellaoui_Imad/Templates/creer_user.html new file mode 100644 index 0000000..957efe3 --- /dev/null +++ b/Ouafellaoui_Imad/Templates/creer_user.html @@ -0,0 +1,24 @@ + + + + Create User + + + +
+
+

Create User

+
+
+
+
+
+
+

+ +
+

{{error_create}}

+
+
+ + diff --git a/Ouafellaoui_Imad/Templates/home.html b/Ouafellaoui_Imad/Templates/home.html new file mode 100644 index 0000000..147171a --- /dev/null +++ b/Ouafellaoui_Imad/Templates/home.html @@ -0,0 +1,74 @@ + + + + + + + + Home + + +
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+ + +
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + {% if db != [] %} +
+ + + + + + + + + + + {% for item in db %} + + + + + + + {% endfor %} + +
NomDateTaillePermission
{{ item.name }}{{ item.date }}{{ item.taille }}{{ item.permission }}
+
+ {% endif %} +
{{ texte }}
+
+ + diff --git a/Ouafellaoui_Imad/Templates/login.html b/Ouafellaoui_Imad/Templates/login.html new file mode 100644 index 0000000..9450323 --- /dev/null +++ b/Ouafellaoui_Imad/Templates/login.html @@ -0,0 +1,24 @@ + + + Welcome to Home Space + + + +
+

Welcome to Home Space

+

Authentication

+
+
+
+
+
+ +

+ +
+
+

{{error_auth}}

+ Create a user +
+ + diff --git a/Ouafellaoui_Imad/__pycache__/model.cpython-310.pyc b/Ouafellaoui_Imad/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000..ef37401 Binary files /dev/null and b/Ouafellaoui_Imad/__pycache__/model.cpython-310.pyc differ diff --git a/Ouafellaoui_Imad/__pycache__/services.cpython-310.pyc b/Ouafellaoui_Imad/__pycache__/services.cpython-310.pyc new file mode 100644 index 0000000..446ff56 Binary files /dev/null and b/Ouafellaoui_Imad/__pycache__/services.cpython-310.pyc differ diff --git a/Ouafellaoui_Imad/app.log b/Ouafellaoui_Imad/app.log new file mode 100644 index 0000000..0bd87a3 --- /dev/null +++ b/Ouafellaoui_Imad/app.log @@ -0,0 +1,247 @@ +2023-04-24 14:20:19,028 INFO: Application started +2023-04-24 14:20:19,051 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-24 14:20:19,052 INFO: Press CTRL+C to quit +2023-04-24 14:20:19,054 INFO: * Restarting with stat +2023-04-24 14:20:19,309 INFO: Application started +2023-04-24 14:20:19,323 WARNING: * Debugger is active! +2023-04-24 14:20:19,447 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:20:29,342 INFO: 127.0.0.1 - - [24/Apr/2023 14:20:29] "GET / HTTP/1.1" 500 - +2023-04-24 14:20:29,364 INFO: 127.0.0.1 - - [24/Apr/2023 14:20:29] "GET / HTTP/1.1" 500 - +2023-04-24 14:20:29,379 INFO: 127.0.0.1 - - [24/Apr/2023 14:20:29] "GET / HTTP/1.1" 500 - +2023-04-24 14:20:29,382 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:29] "GET / HTTP/1.1" 500 - +2023-04-24 14:20:31,189 INFO: 127.0.0.1 - - [24/Apr/2023 14:20:31] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 - +2023-04-24 14:20:31,197 INFO: 127.0.0.1 - - [24/Apr/2023 14:20:31] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 - +2023-04-24 14:20:31,198 INFO: 127.0.0.1 - - [24/Apr/2023 14:20:31] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 - +2023-04-24 14:20:31,201 INFO: 127.0.0.1 - - [24/Apr/2023 14:20:31] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 - +2023-04-24 14:20:31,203 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:31] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 - +2023-04-24 14:20:31,204 INFO: 127.0.0.1 - - [24/Apr/2023 14:20:31] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 - +2023-04-24 14:20:31,206 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:31] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 - +2023-04-24 14:20:31,207 INFO: 127.0.0.1 - - [24/Apr/2023 14:20:31] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 - +2023-04-24 14:20:35,141 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:35] "GET / HTTP/1.1" 500 - +2023-04-24 14:20:35,615 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:35] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 304 - +2023-04-24 14:20:35,618 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:35] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 - +2023-04-24 14:20:36,019 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:36] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 304 - +2023-04-24 14:20:46,813 INFO: Application started +2023-04-24 14:20:46,835 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-24 14:20:46,835 INFO: Press CTRL+C to quit +2023-04-24 14:20:46,837 INFO: * Restarting with stat +2023-04-24 14:20:47,097 INFO: Application started +2023-04-24 14:20:47,107 WARNING: * Debugger is active! +2023-04-24 14:20:47,110 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:20:55,275 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:55] "GET / HTTP/1.1" 500 - +2023-04-24 14:20:55,809 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:55] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 - +2023-04-24 14:20:55,811 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:55] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 - +2023-04-24 14:20:56,531 INFO: 192.168.112.129 - - [24/Apr/2023 14:20:56] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 304 - +2023-04-24 14:21:46,747 INFO: Application started +2023-04-24 14:21:46,765 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-24 14:21:46,769 INFO: Press CTRL+C to quit +2023-04-24 14:21:46,770 INFO: * Restarting with stat +2023-04-24 14:21:47,010 INFO: Application started +2023-04-24 14:21:47,019 WARNING: * Debugger is active! +2023-04-24 14:21:47,020 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:21:53,005 INFO: 192.168.112.129 - - [24/Apr/2023 14:21:53] "GET / HTTP/1.1" 500 - +2023-04-24 14:21:53,469 INFO: 192.168.112.129 - - [24/Apr/2023 14:21:53] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 - +2023-04-24 14:21:53,474 INFO: 192.168.112.129 - - [24/Apr/2023 14:21:53] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 - +2023-04-24 14:21:53,855 INFO: 192.168.112.129 - - [24/Apr/2023 14:21:53] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 304 - +2023-04-24 14:22:15,195 INFO: * Detected change in '/home/imad/Documents/python/Ouafellaoui_Imad/controller.py', reloading +2023-04-24 14:22:15,324 INFO: * Restarting with stat +2023-04-24 14:22:15,593 INFO: Application started +2023-04-24 14:22:15,603 WARNING: * Debugger is active! +2023-04-24 14:22:15,604 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:22:20,679 INFO: Application started +2023-04-24 14:22:20,694 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-24 14:22:20,694 INFO: Press CTRL+C to quit +2023-04-24 14:22:20,695 INFO: * Restarting with stat +2023-04-24 14:22:20,959 INFO: Application started +2023-04-24 14:22:20,969 WARNING: * Debugger is active! +2023-04-24 14:22:20,970 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:22:28,033 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:28] "GET / HTTP/1.1" 200 - +2023-04-24 14:22:28,050 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:28] "GET / HTTP/1.1" 200 - +2023-04-24 14:22:28,622 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:28] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-24 14:22:28,634 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:28] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-24 14:22:28,795 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:28] "GET /favicon.ico HTTP/1.1" 404 - +2023-04-24 14:22:31,094 INFO: Successful login for user: imad +2023-04-24 14:22:31,095 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:31] "POST /login HTTP/1.1" 302 - +2023-04-24 14:22:36,018 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:36] "GET /home/imad HTTP/1.1" 200 - +2023-04-24 14:22:36,077 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:36] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:22:40,930 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:40] "GET /home/Desktop HTTP/1.1" 200 - +2023-04-24 14:22:41,093 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:41] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:22:42,446 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:42] "GET /back HTTP/1.1" 500 - +2023-04-24 14:22:42,793 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:42] "GET /back?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 - +2023-04-24 14:22:42,796 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:42] "GET /back?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 - +2023-04-24 14:22:42,857 INFO: 192.168.112.129 - - [24/Apr/2023 14:22:42] "GET /back?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 - +2023-04-24 14:23:52,510 INFO: * Detected change in '/home/imad/Documents/python/Ouafellaoui_Imad/services.py', reloading +2023-04-24 14:23:52,616 INFO: * Restarting with stat +2023-04-24 14:23:52,848 INFO: Application started +2023-04-24 14:23:52,861 WARNING: * Debugger is active! +2023-04-24 14:23:52,862 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:25:04,301 INFO: * Detected change in '/home/imad/Documents/python/Ouafellaoui_Imad/services.py', reloading +2023-04-24 14:25:04,445 INFO: * Restarting with stat +2023-04-24 14:25:04,687 INFO: Application started +2023-04-24 14:25:04,698 WARNING: * Debugger is active! +2023-04-24 14:25:04,699 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:25:31,862 INFO: * Detected change in '/home/imad/Documents/python/Ouafellaoui_Imad/controller.py', reloading +2023-04-24 14:25:31,930 INFO: * Restarting with stat +2023-04-24 14:25:32,109 INFO: Application started +2023-04-24 14:25:32,118 WARNING: * Debugger is active! +2023-04-24 14:25:32,119 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:25:47,520 INFO: Application started +2023-04-24 14:25:47,534 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-24 14:25:47,535 INFO: Press CTRL+C to quit +2023-04-24 14:25:47,537 INFO: * Restarting with stat +2023-04-24 14:25:47,790 INFO: Application started +2023-04-24 14:25:47,802 WARNING: * Debugger is active! +2023-04-24 14:25:47,803 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:25:55,864 INFO: 192.168.112.129 - - [24/Apr/2023 14:25:55] "GET / HTTP/1.1" 200 - +2023-04-24 14:25:56,190 INFO: 192.168.112.129 - - [24/Apr/2023 14:25:56] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-24 14:25:56,338 INFO: 192.168.112.129 - - [24/Apr/2023 14:25:56] "GET /favicon.ico HTTP/1.1" 404 - +2023-04-24 14:25:57,638 INFO: Successful login for user: imad +2023-04-24 14:25:57,639 INFO: 192.168.112.129 - - [24/Apr/2023 14:25:57] "POST /login HTTP/1.1" 302 - +2023-04-24 14:26:09,124 INFO: 192.168.112.129 - - [24/Apr/2023 14:26:09] "GET /home/imad HTTP/1.1" 200 - +2023-04-24 14:26:09,201 INFO: 192.168.112.129 - - [24/Apr/2023 14:26:09] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:26:12,712 INFO: 192.168.112.129 - - [24/Apr/2023 14:26:12] "GET /home/Desktop HTTP/1.1" 200 - +2023-04-24 14:26:12,828 INFO: 192.168.112.129 - - [24/Apr/2023 14:26:12] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:26:13,693 INFO: 192.168.112.129 - - [24/Apr/2023 14:26:13] "GET /back HTTP/1.1" 200 - +2023-04-24 14:26:13,901 INFO: 192.168.112.129 - - [24/Apr/2023 14:26:13] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:26:50,146 INFO: * Detected change in '/home/imad/Documents/python/Ouafellaoui_Imad/controller.py', reloading +2023-04-24 14:26:50,282 INFO: * Restarting with stat +2023-04-24 14:26:50,511 INFO: Application started +2023-04-24 14:26:50,523 WARNING: * Debugger is active! +2023-04-24 14:26:50,525 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:26:54,283 INFO: Application started +2023-04-24 14:26:54,295 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-24 14:26:54,296 INFO: Press CTRL+C to quit +2023-04-24 14:26:54,297 INFO: * Restarting with stat +2023-04-24 14:26:54,529 INFO: Application started +2023-04-24 14:26:54,542 WARNING: * Debugger is active! +2023-04-24 14:26:54,544 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:27:00,512 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:00] "GET / HTTP/1.1" 200 - +2023-04-24 14:27:00,612 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:00] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:01,494 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:01] "GET / HTTP/1.1" 200 - +2023-04-24 14:27:01,795 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:01] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:03,451 INFO: Successful login for user: imad +2023-04-24 14:27:03,453 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:03] "POST /login HTTP/1.1" 302 - +2023-04-24 14:27:08,301 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:08] "GET /home/imad HTTP/1.1" 200 - +2023-04-24 14:27:08,366 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:08] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:12,537 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:12] "GET /home/Desktop HTTP/1.1" 200 - +2023-04-24 14:27:12,865 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:12] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:13,465 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:13] "GET /back HTTP/1.1" 200 - +2023-04-24 14:27:13,734 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:13] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:17,270 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:17] "GET /home/Desktop HTTP/1.1" 200 - +2023-04-24 14:27:17,435 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:17] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:18,581 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:18] "GET /home/web-school HTTP/1.1" 200 - +2023-04-24 14:27:18,846 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:18] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:19,616 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:19] "GET /back HTTP/1.1" 200 - +2023-04-24 14:27:19,819 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:19] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:21,283 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:21] "GET /home/web-school HTTP/1.1" 200 - +2023-04-24 14:27:21,462 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:21] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:22,200 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:22] "GET /home/controller.py HTTP/1.1" 200 - +2023-04-24 14:27:22,401 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:22] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:27:23,290 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:23] "GET /back HTTP/1.1" 500 - +2023-04-24 14:27:23,742 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:23] "GET /back?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 - +2023-04-24 14:27:23,743 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:23] "GET /back?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 - +2023-04-24 14:27:23,756 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:23] "GET /back?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 - +2023-04-24 14:27:23,764 INFO: 192.168.112.129 - - [24/Apr/2023 14:27:23] "GET /back?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 304 - +2023-04-24 14:27:48,854 INFO: * Detected change in '/home/imad/Documents/python/Ouafellaoui_Imad/controller.py', reloading +2023-04-24 14:27:49,005 INFO: * Restarting with stat +2023-04-24 14:27:49,304 INFO: Application started +2023-04-24 14:27:49,319 WARNING: * Debugger is active! +2023-04-24 14:27:49,319 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:27:55,316 INFO: Application started +2023-04-24 14:27:55,331 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-24 14:27:55,332 INFO: Press CTRL+C to quit +2023-04-24 14:27:55,333 INFO: * Restarting with stat +2023-04-24 14:27:55,529 INFO: Application started +2023-04-24 14:27:55,539 WARNING: * Debugger is active! +2023-04-24 14:27:55,540 INFO: * Debugger PIN: 132-390-539 +2023-04-24 14:28:01,624 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:01] "GET / HTTP/1.1" 200 - +2023-04-24 14:28:01,935 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:01] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:02,342 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:02] "GET / HTTP/1.1" 200 - +2023-04-24 14:28:02,503 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:02] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:04,249 INFO: Successful login for user: imad +2023-04-24 14:28:04,251 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:04] "POST /login HTTP/1.1" 302 - +2023-04-24 14:28:09,176 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:09] "GET /home/imad HTTP/1.1" 200 - +2023-04-24 14:28:09,248 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:09] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:11,979 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:11] "GET /home/Desktop HTTP/1.1" 200 - +2023-04-24 14:28:12,093 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:12] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:12,780 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:12] "GET /home/web-school HTTP/1.1" 200 - +2023-04-24 14:28:13,017 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:13] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:14,020 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:14] "GET /home/controller.py HTTP/1.1" 200 - +2023-04-24 14:28:14,155 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:14] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:15,095 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:15] "GET /back HTTP/1.1" 200 - +2023-04-24 14:28:15,291 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:15] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:16,843 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:16] "GET /home/controller.py HTTP/1.1" 200 - +2023-04-24 14:28:17,015 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:17] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:18,202 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:18] "GET /back HTTP/1.1" 200 - +2023-04-24 14:28:18,385 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:18] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:19,181 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:19] "GET /back HTTP/1.1" 200 - +2023-04-24 14:28:19,315 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:19] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:20,568 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:20] "GET /back HTTP/1.1" 200 - +2023-04-24 14:28:20,694 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:20] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:31,118 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:31] "GET /home/Desktop HTTP/1.1" 200 - +2023-04-24 14:28:31,231 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:31] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 14:28:33,942 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:33] "GET /back HTTP/1.1" 200 - +2023-04-24 14:28:34,109 INFO: 192.168.112.129 - - [24/Apr/2023 14:28:34] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 19:21:46,016 INFO: Application started +2023-04-24 19:21:46,032 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-24 19:21:46,033 INFO: Press CTRL+C to quit +2023-04-24 19:21:46,036 INFO: * Restarting with stat +2023-04-24 19:21:46,167 INFO: Application started +2023-04-24 19:21:46,174 WARNING: * Debugger is active! +2023-04-24 19:21:46,233 INFO: * Debugger PIN: 952-805-710 +2023-04-24 19:21:57,162 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:57] "GET / HTTP/1.1" 200 - +2023-04-24 19:21:57,163 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:57] "GET / HTTP/1.1" 200 - +2023-04-24 19:21:57,165 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:57] "GET / HTTP/1.1" 200 - +2023-04-24 19:21:57,290 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:57] "GET / HTTP/1.1" 200 - +2023-04-24 19:21:57,877 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:57] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-24 19:21:57,878 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:57] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-24 19:21:57,883 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:57] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-24 19:21:57,938 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:57] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-24 19:21:59,087 INFO: Successful login for user: imad +2023-04-24 19:21:59,088 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:59] "POST /login HTTP/1.1" 302 - +2023-04-24 19:21:59,102 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:59] "GET /home/imad HTTP/1.1" 200 - +2023-04-24 19:21:59,314 INFO: 192.168.112.129 - - [24/Apr/2023 19:21:59] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 19:22:31,167 INFO: Application started +2023-04-24 19:22:31,175 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-24 19:22:31,176 INFO: Press CTRL+C to quit +2023-04-24 19:22:31,176 INFO: * Restarting with stat +2023-04-24 19:22:31,309 INFO: Application started +2023-04-24 19:22:31,315 WARNING: * Debugger is active! +2023-04-24 19:22:31,315 INFO: * Debugger PIN: 952-805-710 +2023-04-24 19:22:37,663 INFO: 192.168.112.129 - - [24/Apr/2023 19:22:37] "GET / HTTP/1.1" 200 - +2023-04-24 19:22:37,670 INFO: 192.168.112.129 - - [24/Apr/2023 19:22:37] "GET / HTTP/1.1" 200 - +2023-04-24 19:22:38,107 INFO: 192.168.112.129 - - [24/Apr/2023 19:22:38] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-24 19:22:38,108 INFO: 192.168.112.129 - - [24/Apr/2023 19:22:38] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-24 19:22:39,591 INFO: Successful login for user: imad +2023-04-24 19:22:39,592 INFO: 192.168.112.129 - - [24/Apr/2023 19:22:39] "POST /login HTTP/1.1" 302 - +2023-04-24 19:22:39,604 INFO: 192.168.112.129 - - [24/Apr/2023 19:22:39] "GET /home/imad HTTP/1.1" 200 - +2023-04-24 19:22:39,639 INFO: 192.168.112.129 - - [24/Apr/2023 19:22:39] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-24 19:22:41,198 INFO: 192.168.112.129 - - [24/Apr/2023 19:22:41] "GET /back HTTP/1.1" 200 - +2023-04-24 19:22:41,247 INFO: 192.168.112.129 - - [24/Apr/2023 19:22:41] "GET /static/css/styles.css HTTP/1.1" 304 - diff --git a/Ouafellaoui_Imad/controller.py b/Ouafellaoui_Imad/controller.py new file mode 100644 index 0000000..3cc9ad9 --- /dev/null +++ b/Ouafellaoui_Imad/controller.py @@ -0,0 +1,106 @@ +from datetime import datetime +import hashlib +import os +from venv import logger +from services import Services +import logging +from flask import ( + Flask, + request, + render_template, + redirect, + send_file, + session, + url_for, +) +logging.basicConfig(filename='app.log', level=logging.INFO, format='%(asctime)s %(levelname)s: %(message)s') +logging.info('Application started') + +template_dir = os.path.abspath('/home/imad/Documents/python/Ouafellaoui_Imad/Templates') +app = Flask(__name__, template_folder=template_dir, static_folder='static') +app.secret_key = "1234" +def generate_key(login): + return hashlib.md5(str(login).encode('utf-8')).hexdigest() + +@app.route('/') +def index(): + return render_template("login.html") + +@app.route('/home/') +def home(name): + ser.getContent(name) + first_key = next(iter(ser.index)) + path = ser.index[first_key] + if os.path.isdir(first_key): + return render_template("home.html", db=path, Space=ser.get_nb_of_Dirs()["Space"], Dirs=ser.get_nb_of_Dirs()["Dirs"], Files=ser.get_nb_of_Dirs()["Files"],texte="") + else : + return render_template("home.html", db=[], Space="", Dirs="", Files="",texte=ser.Cat_File(first_key)) + +@app.route('/Rechercher') +def rechercher(): + keyword = request.args.get('keyword') + return render_template('home.html', db=ser.rechercher(keyword), Space=ser.get_nb_of_Dirs_by_Keyword(keyword)["Space"], Dirs=ser.get_nb_of_Dirs_by_Keyword(keyword)["Dirs"], Files=ser.get_nb_of_Dirs_by_Keyword(keyword)["Files"],text="") + +@app.route('/telecharger') +def download_home_dir(): + path=ser.Compresser_zip() + logging.info('Home directory downloaded') + return send_file(path, as_attachment=True) + + +@app.route('/logout') +def logout(): + logger.info('User %s logged out', session.get('user_id')) + session.pop('user_id',None) + ser.index={} + return redirect(url_for('index')) + +@app.route('/login', methods=['POST']) +def login(): + username = request.form['username'] + password = request.form['password'] + try: + _res = ser.Connecter_User(username, password) + if _res: + app.secret_key=generate_key(login) + session['user_id'] = username + response = app.make_response(redirect(url_for('home', name=username))) + response.set_cookie('access_time', str(datetime.now())) + logging.info('Successful login for user: %s', username) + return response + else: + logging.warning('Failed login attempt for user: %s', username) + return render_template('login.html', error_auth='login or password incorrect') + except Exception as e: + logging.error('Exception occurred during login: %s', str(e)) + return render_template('login.html', error_auth=str(e)) + + +@app.route('/CreerUser', methods=['GET']) +def creer_user(): + return render_template('creer_user.html') + +@app.route('/create_user', methods=['POST', 'GET']) +def create_user(): + if request.method == 'POST': + username = request.form['username'] + password1 = request.form['password1'] + password2 = request.form['password2'] + success = ser.Creer_User(username, password1, password2) + if success == 'Utilisateur bien ajouté': + return redirect(url_for('index')) + else: + return render_template('creer_user.html', error_create=success) + else: + return render_template('creer_user.html') + +@app.route('/back') +def back(): + ser.modifier_key() + first_key = next(iter(ser.index)) + return render_template("home.html", db=ser.index[first_key], Space=ser.get_nb_of_Dirs()["Space"], Dirs=ser.get_nb_of_Dirs()["Dirs"], Files=ser.get_nb_of_Dirs()["Files"],texte="") + +if __name__ == '__main__': + ser = Services() + logging.basicConfig(filename='app.log', level=logging.INFO) + app.run(host='0.0.0.0', port=8080, debug=True) diff --git a/Ouafellaoui_Imad/model.py b/Ouafellaoui_Imad/model.py new file mode 100644 index 0000000..d7167b8 --- /dev/null +++ b/Ouafellaoui_Imad/model.py @@ -0,0 +1,15 @@ +from dataclasses import dataclass + +@dataclass +class dossier: + permission:str + nb_lien:str + nom_prop:str + nom_grp:str + taille:str + date:str + name:str + + + + diff --git a/Ouafellaoui_Imad/services.py b/Ouafellaoui_Imad/services.py new file mode 100644 index 0000000..5e07b4f --- /dev/null +++ b/Ouafellaoui_Imad/services.py @@ -0,0 +1,132 @@ +import os +import subprocess +import zipfile +from model import dossier + +class Services: + index: dict = {} + _user:str + + def getContent(self, folder: str) -> dict: + if not self.index: + path = "/home/" + folder + self.index[path] = [] + else: + first_key = next(iter(self.index)) + path = "/" + folder + new_key=first_key+path + self.index={} + self.index[new_key]=[] + + first_key = next(iter(self.index)) + output = subprocess.check_output(['ls', '-l', '--time-style=+%d/%m/%Y', first_key]) + dossiers = [] + output_lines = output.decode().split('\n') + for line in output_lines: + res = line.split() + if len(res) == 7: + dossiers.append(dossier(res[0], res[1], res[2], res[3], res[4], + res[5] ,res[6])) + self.index[list(self.index.keys())[0]] = dossiers + + + def rechercher(self,keyword): + dossiers = [] + if self.index=={}: + return [] + else: + first_key = next(iter(self.index)) + for val in self.index[first_key]: + if keyword in val.name or keyword==val : + dossiers.append(val) + return dossiers + + def get_nb_of_Dirs(self)->dict: + dic_nb={} + dic_nb["Dirs"]=0 + dic_nb["Files"]=0 + dic_nb["Space"]=0 + first_key = next(iter(self.index)) + for val in self.index[first_key]: + if val.permission.startswith('d'): + dic_nb["Dirs"]+=1 + else: + dic_nb["Files"]+=1 + dic_nb["Space"]+=int(val.taille) + return dic_nb + + def get_nb_of_Dirs_by_Keyword(self,Keyword)->dict: + dossiers = self.rechercher(Keyword) + dic_nb={} + dic_nb["Dirs"]=0 + dic_nb["Files"]=0 + dic_nb["Space"]=0 + for val in dossiers: + if val.permission.startswith('d'): + dic_nb["Dirs"]+=1 + else: + dic_nb["Files"]+=1 + dic_nb["Space"]+=int(val.taille) + return dic_nb + + def Connecter_User(self,username, password) -> bool: + try: + command = ["su", "-c", "whoami", username] + self._user=username + result = subprocess.run(command, input=password.encode(), capture_output=True) + return result.returncode == 0 + except subprocess.CalledProcessError: + return False + + def Creer_User(self, username:str, password1:str, password2:str)->str: + result = subprocess.run(['id', '-u', username], stdout=subprocess.PIPE) + if result.returncode == 0: + return 'L utilisateur existe déjà' + if password1==password2: + subprocess.run(['sudo', 'useradd', '-p', password1, username]) + return 'Utilisateur bien ajouté' + else: + return 'Les deux mots de passe ne sont pas identiques' + + def Compresser_zip(self): + home_dir = "/home/" + self._user + zip_filename = self._user + ".zip" + zip_filepath = os.path.join(home_dir, zip_filename) + with zipfile.ZipFile(zip_filepath, "w", zipfile.ZIP_DEFLATED) as zip_file: + for root,dirs, files in os.walk(home_dir): + for file in files: + file_path = os.path.join(root, file) + try: + zip_file.write(file_path, os.path.relpath(file_path, home_dir)) + except FileNotFoundError: + print(f"Ignoré le fichier {file_path} qui n'existe pas.") + return zip_filepath + + def Cat_File(self,file)->str: + try: + with open(file, 'r') as f: + contenu = f.read() + return contenu + except FileNotFoundError: + return "Le fichier spécifié n'existe pas." + + def modifier_key(self)->str: + first_key = next(iter(self.index)) + d=self.index[first_key] + index_dernier_slash = first_key.rfind("/") + if index_dernier_slash != -1: + first_key = first_key[:index_dernier_slash] + if first_key[-1] == "/": + first_key = first_key[:-1] + self.index={} + self.index[first_key]=d + + output = subprocess.check_output(['ls', '-l', '--time-style=+%d/%m/%Y', first_key]) + dossiers = [] + output_lines = output.decode().split('\n') + for line in output_lines: + res = line.split() + if len(res) == 7: + dossiers.append(dossier(res[0], res[1], res[2], res[3], res[4], + res[5] ,res[6])) + self.index[list(self.index.keys())[0]] = dossiers \ No newline at end of file diff --git a/Ouafellaoui_Imad/static/css/styles.css b/Ouafellaoui_Imad/static/css/styles.css new file mode 100644 index 0000000..d1853c0 --- /dev/null +++ b/Ouafellaoui_Imad/static/css/styles.css @@ -0,0 +1,154 @@ +html, body { + height: 100%; + width: 100%; +} +.data-grid { + border-collapse: collapse; + width: 100%; +} + +.data-grid th, +.data-grid td { + padding: 8px; + text-align: left; + border-bottom: 1px solid #ddd; +} + +.data-grid th { + background-color: #f2f2f2; + font-weight: bold; +} + +.data-grid tr:hover { + background-color: #f5f5f5; +} + +.data-grid a { + color: #333; + text-decoration: none; +} + +.data-grid a:hover { + text-decoration: underline; +} + +.line{ + display: flex; + flex-wrap: wrap; + background-color:white; +} + + +.container { + margin: auto; + width: 900px; + align-items: center; + justify-content: center; + background-color: #f2f2f2; + padding: 40px; + border-radius: 30px; +} +.container input[type="text"] { + border: none; + outline: none; + padding: 10px; + font-size: 16px; + width: 100%; + background-color: transparent; +} + +.container button[type="submit"] { + display: inline-block; + vertical-align: middle; + background-color: #4CAF50; + color: white; + border: none; + padding: 10px 20px; + text-decoration: none; + font-size: 16px; + margin-left: 10px; + border-radius: 5px; + cursor: pointer; +} +.container input[type="submit"]:hover { + background-color: #3e8e41; +} +.lines{ + display: flex; + flex-wrap: nowrap; +} +.liness{ + display: flex; + flex-wrap: nowrap; + border: 1px solid green; + border-radius: 10px; + padding: 10px; + margin: 5px; +} +.lines form { + margin-left: 20px; +} +.color{ + border: 2px solid greenyellow; +} + + + +/**********************************************/ +.body-style { + background-color: #f0f0f0; +} + +.center-style { + margin-top: 10%; +} + +.form-title { + color: blue; +} + +.form-style { + border: 2px groove green; + padding: 20px; + width:750px; + border-radius: 10px; + margin:auto; + background-color: white; +} + +.label-style { + font-weight: bold; +} + +input[type="text"], input[type="password"] { + border: 2px groove blue; + border-radius: 5px; + padding: 5px; + width: 250px; + margin-bottom: 10px; +} + +input[type="submit"] { + background-color: green; + color: white; + font-weight: bold; + padding: 5px 20px; + border: none; + border-radius: 5px; + cursor: pointer; +} + +.a-style { + color: blue; + text-decoration: none; + margin-left: 10px; +} + +.a-style:hover { + text-decoration: underline; +} + +.error-message { + color: red; + margin-top: 10px; +} diff --git a/README.md b/README.md index 5581ec4..b262006 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ +[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-24ddc0f5d75046c5622901739e7c5dd533143b0c8e959d652212380cedb1ea36.svg)](https://classroom.github.com/a/wjmO5Bst) [![Open in Visual Studio Code](https://classroom.github.com/assets/open-in-vscode-718a45dd9cf7e7f842a935f5ebbe5719a5e09af4491e668f4dbf3b35d5cca122.svg)](https://classroom.github.com/online_ide?assignment_repo_id=10861942&assignment_repo_type=AssignmentRepo) diff --git a/app.log b/app.log new file mode 100644 index 0000000..3f9a368 --- /dev/null +++ b/app.log @@ -0,0 +1,49 @@ +2023-04-25 21:43:05,124 INFO: Application started +2023-04-25 21:43:05,140 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-25 21:43:05,140 INFO: Press CTRL+C to quit +2023-04-25 21:43:05,143 INFO: * Restarting with stat +2023-04-25 21:43:05,302 INFO: Application started +2023-04-25 21:43:05,308 WARNING: * Debugger is active! +2023-04-25 21:43:05,312 INFO: * Debugger PIN: 102-313-398 +2023-04-25 21:43:12,968 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:12] "GET / HTTP/1.1" 200 - +2023-04-25 21:43:13,233 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:13] "GET / HTTP/1.1" 200 - +2023-04-25 21:43:13,614 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:13] "GET / HTTP/1.1" 200 - +2023-04-25 21:43:13,703 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:13] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-25 21:43:13,781 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:13] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-25 21:43:14,102 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:14] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-25 21:43:15,332 INFO: Successful login for user: imad +2023-04-25 21:43:15,333 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:15] "POST /login HTTP/1.1" 302 - +2023-04-25 21:43:15,353 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:15] "GET /home/imad HTTP/1.1" 200 - +2023-04-25 21:43:15,405 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:15] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-25 21:43:30,446 INFO: * Detected change in '/home/imad/Desktop/Ouafellaoui_Imad/webhomespace-IMAD619/Ouafellaoui_Imad/controller.py', reloading +2023-04-25 21:43:30,496 INFO: * Restarting with stat +2023-04-25 21:43:30,685 INFO: Application started +2023-04-25 21:43:30,693 WARNING: * Debugger is active! +2023-04-25 21:43:30,693 INFO: * Debugger PIN: 102-313-398 +2023-04-25 21:43:37,854 INFO: Application started +2023-04-25 21:43:37,861 INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://192.168.112.129:8080 +2023-04-25 21:43:37,862 INFO: Press CTRL+C to quit +2023-04-25 21:43:37,862 INFO: * Restarting with stat +2023-04-25 21:43:37,991 INFO: Application started +2023-04-25 21:43:37,996 WARNING: * Debugger is active! +2023-04-25 21:43:37,997 INFO: * Debugger PIN: 102-313-398 +2023-04-25 21:43:44,419 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:44] "GET / HTTP/1.1" 200 - +2023-04-25 21:43:44,420 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:44] "GET / HTTP/1.1" 200 - +2023-04-25 21:43:44,869 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:44] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-25 21:43:44,872 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:44] "GET /static/css/styles.css HTTP/1.1" 200 - +2023-04-25 21:43:45,030 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:45] "GET /favicon.ico HTTP/1.1" 404 - +2023-04-25 21:43:46,163 INFO: Successful login for user: imad +2023-04-25 21:43:46,164 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:46] "POST /login HTTP/1.1" 302 - +2023-04-25 21:43:46,192 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:46] "GET /home/imad HTTP/1.1" 200 - +2023-04-25 21:43:46,283 INFO: 192.168.112.129 - - [25/Apr/2023 21:43:46] "GET /static/css/styles.css HTTP/1.1" 304 - +2023-04-25 21:43:54,090 INFO: * Detected change in '/home/imad/Desktop/Ouafellaoui_Imad/webhomespace-IMAD619/Ouafellaoui_Imad/controller.py', reloading +2023-04-25 21:43:54,145 INFO: * Restarting with stat +2023-04-25 21:43:54,311 INFO: Application started +2023-04-25 21:43:54,319 WARNING: * Debugger is active! +2023-04-25 21:43:54,319 INFO: * Debugger PIN: 102-313-398