From 71b62f2a4cdbe8850a3024ecb8d2836849e74ef1 Mon Sep 17 00:00:00 2001 From: hok7z Date: Mon, 29 Aug 2022 19:10:44 +0300 Subject: [PATCH] First commit --- .gitignore | 1 + README.md | 7 + app.py | 20 +++ apps/__pycache__/admin.cpython-310.pyc | Bin 0 -> 644 bytes apps/__pycache__/auth.cpython-310.pyc | Bin 0 -> 913 bytes apps/admin.py | 12 ++ apps/auth.py | 23 +++ database/__init__.py | 0 database/__pycache__/__init__.cpython-310.pyc | Bin 0 -> 158 bytes database/__pycache__/models.cpython-310.pyc | Bin 0 -> 1093 bytes database/database.py | 0 database/models.py | 27 +++ db.db | Bin 0 -> 8192 bytes poetry.lock | 164 ++++++++++++++++++ pyproject.toml | 16 ++ static/css/login.css | 0 static/css/main.css | 0 templates/admin.html | 13 ++ templates/index.html | 0 templates/login.html | 3 + 20 files changed, 286 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 app.py create mode 100644 apps/__pycache__/admin.cpython-310.pyc create mode 100644 apps/__pycache__/auth.cpython-310.pyc create mode 100644 apps/admin.py create mode 100644 apps/auth.py create mode 100644 database/__init__.py create mode 100644 database/__pycache__/__init__.cpython-310.pyc create mode 100644 database/__pycache__/models.cpython-310.pyc create mode 100644 database/database.py create mode 100644 database/models.py create mode 100644 db.db create mode 100644 poetry.lock create mode 100644 pyproject.toml create mode 100644 static/css/login.css create mode 100644 static/css/main.css create mode 100644 templates/admin.html create mode 100644 templates/index.html create mode 100644 templates/login.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..73f59e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +pyrightconfig.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..282dca8 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# About +Web application for telegram group moderation. + +# TODO +- [ ] Login page. +- [ ] Simple left dashbord. +- [ ] Table members. diff --git a/app.py b/app.py new file mode 100644 index 0000000..8a2734b --- /dev/null +++ b/app.py @@ -0,0 +1,20 @@ +from flask import Flask +from os import urandom + +from apps.admin import admin as blueprint_admin +from apps.auth import auth as blueprint_auth + +from database.models import build_models + +import logging + +app = Flask(__name__) +app.secret_key = urandom(24) + +app.register_blueprint(blueprint_auth) +app.register_blueprint(blueprint_admin) + +if __name__ == '__main__': + logging.info("Build database models") + build_models() + app.run(host="0.0.0.0") diff --git a/apps/__pycache__/admin.cpython-310.pyc b/apps/__pycache__/admin.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..34cc40b6b2e4347180d63b5aa3f90764c45dabb1 GIT binary patch literal 644 zcmZXRy^a$x5XWt2zp|GED48@cLYl(+!xb^Nb-c^*ext4c;l2>vG z6|X?W*g+x^BY8aIo&Eba<8D6B8QJ?Ev&}VU?59sIEu!R_mc1vZndS{MyyQldg8N)F z6BCsYXTbFY;*%&7NWP{z`o?vvlSg*qWd_NoRHr)Iay|Vbbgr+$`BcyDSTX-a%B&D> z`lcD7$6Y(PCkU+uR0Ej4sRk&xd$ENUkYd$W*6ushs;+G9;!2xcdrV~5H(u+~1SL1L zY({P%{u8G=#qBW<_3L^tO~G+OU%xX7g0*TxfzuyDpS79zjr{21YS{mTjVYdouLN} zqbQ&40UwSqZr2tzBkqO+dH|Ox)m8?S!q}%VcH;n{v!HcxaTsN|J$psd8XI`+d$9|0 PPuYy;A`>}ZOcwkPtjm+u literal 0 HcmV?d00001 diff --git a/apps/__pycache__/auth.cpython-310.pyc b/apps/__pycache__/auth.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..53249934221f478b9b45d9ec405774a746c3f7f6 GIT binary patch literal 913 zcmZva&2H2%5XbF&Y_e%KZ3WzV;F?35GZI3m2yrV&?E&Qyg?PHzHr}LTN2{*Hh2_dS zv`1da5+_c)LQjlMKP4>Lo_Oq;-~1>2Y?d$@H^0*6v&YzP`|)^$^zoLa`bLXjf_F^v zl1s1jq+j|nC<7UmA-6uSo5-k)I0G(xh&Nt2h3Qoyf@==bvqXeqGUp=t;fYvGzq1YB z@N(R!&SxyZz}JDG`{W0vp!Ar6*@W_s9-FyLaT%{IbP09G30(A64D zgm5u}(k4a_3xr0SXvD5M?J?)(S<^yuUJbQUs~$zw)~Yo@J?i#`7wbvU_4CEj_#fV% z(B(*iZhN5`oA&V_vDiDBDyBt~FdI&I-qAX7?+;onyPTs>-k%Ip+T3#Us%U!&#YNHd z0*c|XSizU#w5!#*we}^QVy%1JR|^eAJq)U_Xa~ck$z0_7GAA~>#fW{(Xfwg5kH;rZ zK&{sjIM6*ZG&|#0p5WK~>z(b9P5mPH;K;&|c)o^lexRTk zaiK3UqPr%pDyvUbp>4bgkqQ8(zbnec|1V4YntD5S@P^YnWs&w+$`dd4GM@6xPk0<> F{4d~)&n*A| literal 0 HcmV?d00001 diff --git a/apps/admin.py b/apps/admin.py new file mode 100644 index 0000000..be55f0d --- /dev/null +++ b/apps/admin.py @@ -0,0 +1,12 @@ +from flask import Blueprint,render_template +from werkzeug.security import generate_password_hash + +admin = Blueprint('admin',__name__) + +@admin.route("/admin") +def admin_page(): + return render_template("admin.html") + +@admin.route("/new-web-user",methods=["POST"]) +def new_web_user(): + return "Create a new web user" diff --git a/apps/auth.py b/apps/auth.py new file mode 100644 index 0000000..a119b05 --- /dev/null +++ b/apps/auth.py @@ -0,0 +1,23 @@ +from flask import Blueprint,render_template,request,redirect,url_for +from werkzeug.security import check_password_hash + +auth = Blueprint('auth',__name__) + +@auth.route("/") +@auth.route("/login",methods=["GET"]) +def login_template(): + return render_template("login.html") + +@auth.route("/login",methods=["POST"]) +def login(): + username = request.form.get("username") + password = request.form.get("password") + + # TODO: check hash password in database + + return "Some operations" + +@auth.route("/logout") +def logout(): + # Logout from account + return redirect(url_for("auth.login")) diff --git a/database/__init__.py b/database/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/database/__pycache__/__init__.cpython-310.pyc b/database/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..01481da5f1b0c05c4b8dd9d86b91d0fe38795fd6 GIT binary patch literal 158 zcmd1j<>g`k0+V|@$sqbMh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o6vJKO;XkRliU_ zIX@*;zo1gTJT*x_Ehn)!8^qGh1&S6WmgE=d7H5{E>Zc@@Bqk*mr|QSYXXa&=#K-Fu WRNmsS0jes^NwotRUCaa|SQr2k<0PU0 literal 0 HcmV?d00001 diff --git a/database/__pycache__/models.cpython-310.pyc b/database/__pycache__/models.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..48417d82cb4f85816bd8266b025b5a01afa72b7c GIT binary patch literal 1093 zcmZuw!EVz)5Zzs`9j7>uRz*mha>PQ!7fuL4rHFEBE(Ia&#j?E<9O}f$uA?+nIi(-c z9Qh?5;lu}U;lzwX+9EpAj(65GZ)V=?mYvQXL;3YR$j$|0KghT%5{)BVmXv0i7i_{6 zp9m#5*`jbJQc2E0YG=)r`<`j3-7BVD;A=;D+S9EordrxRWnud#qOefZ?n$YksM~`) zF~?&lbja&gR!*moRTq!!yck#TDvBbV_H~+3&|PuRIKpLLq5`J4W=epwW=b}iir`vc z5n?T{1P59p(Uc{XuRScJRkuDt`q6^<51jA75AT3$t{jlc)dGW^i{Ni?{{*T;`AbL_ z2xW(%SNm~1O(qb>^J`?FOoskRQ{Sr3)ZB=@-? zyY>uJ3p34d-Zw&&(yRx#>@!pqyXG5qEh_fKx#VYJ!@r74VY-*%T5gy<(EJqXZP<7| z$RRuHjYqvIhaNFOefHpdY%ALvPkTvkS6~15L+Bb8@oUdQfzz(tWex^ve-~GK+rZGN zCAy5vK6$(I1(?+>KPI5lJqmi)0(@Hx??!;rvyv`?Q-)3Kf};h-V9&~ yVCcB%Q*~!WvdT*&1fNyBFomI+H)*$dDD>WB{_E{senZcrX}8M)?#r$d?EeA7{_}bO literal 0 HcmV?d00001 diff --git a/database/database.py b/database/database.py new file mode 100644 index 0000000..e69de29 diff --git a/database/models.py b/database/models.py new file mode 100644 index 0000000..12efdf8 --- /dev/null +++ b/database/models.py @@ -0,0 +1,27 @@ +from peewee import Model,CharField +from playhouse.db_url import connect + + +# TODO: create connection to bot database +db = connect("sqlite:///db.db") + + +class WebUser(Model): + username = CharField() + password_hash = CharField() + + class Meta: + db_table = "webusers" + database = db + + def userExists(self,username) -> bool: + """Check if the username exists in a database.""" + query = WebUser.select().where(WebUser.username == username) + + if (not query) or (not query.exists()): + return False + + return True + +def build_models(): + db.create_tables([WebUser]) diff --git a/db.db b/db.db new file mode 100644 index 0000000000000000000000000000000000000000..0cb34fd41e1290ba4b445bb56ab5c75432bc38f9 GIT binary patch literal 8192 zcmeI#F^d8*5Cz~w1S`=-1VI>6DaaLy{Y43ry^*X;-60`ZWSG&158@sIM23pBTQ6&3;B9T1{ zYKp^F&?t=5m(mnYBMKKmKr=m>NWG%5TD3`}U;UY*6||IkFqFF4>GfLAv`?IkbJtV6 nUGI(C{}XGaySZQbQ4oLt1Rwwb2tWV=5P$##AOHafys^Loe1tb& literal 0 HcmV?d00001 diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..55f8c8f --- /dev/null +++ b/poetry.lock @@ -0,0 +1,164 @@ +[[package]] +name = "click" +version = "8.1.3" +description = "Composable command line interface toolkit" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "colorama" +version = "0.4.5" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "flask" +version = "2.2.2" +description = "A simple framework for building complex web applications." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +click = ">=8.0" +itsdangerous = ">=2.0" +Jinja2 = ">=3.0" +Werkzeug = ">=2.2.2" + +[package.extras] +async = ["asgiref (>=3.2)"] +dotenv = ["python-dotenv"] + +[[package]] +name = "itsdangerous" +version = "2.1.2" +description = "Safely pass data to untrusted environments and back." +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "markupsafe" +version = "2.1.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "peewee" +version = "3.15.2" +description = "a little orm" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "werkzeug" +version = "2.2.2" +description = "The comprehensive WSGI web application library." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +MarkupSafe = ">=2.1.1" + +[package.extras] +watchdog = ["watchdog"] + +[metadata] +lock-version = "1.1" +python-versions = "^3.10" +content-hash = "e7271d1eb6d12c522fffb69930d46df672d9b0e437c280e3a9975a8be298bb52" + +[metadata.files] +click = [ + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, +] +colorama = [ + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, +] +flask = [ + {file = "Flask-2.2.2-py3-none-any.whl", hash = "sha256:b9c46cc36662a7949f34b52d8ec7bb59c0d74ba08ba6cb9ce9adc1d8676d9526"}, + {file = "Flask-2.2.2.tar.gz", hash = "sha256:642c450d19c4ad482f96729bd2a8f6d32554aa1e231f4f6b4e7e5264b16cca2b"}, +] +itsdangerous = [ + {file = "itsdangerous-2.1.2-py3-none-any.whl", hash = "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44"}, + {file = "itsdangerous-2.1.2.tar.gz", hash = "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a"}, +] +jinja2 = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] +markupsafe = [ + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, +] +peewee = [ + {file = "peewee-3.15.2.tar.gz", hash = "sha256:94d8eb7fc2b8d97d6216382bf5961239645dc9e2473b0e732eb6c79c920c4768"}, +] +werkzeug = [ + {file = "Werkzeug-2.2.2-py3-none-any.whl", hash = "sha256:f979ab81f58d7318e064e99c4506445d60135ac5cd2e177a2de0089bfd4c9bd5"}, + {file = "Werkzeug-2.2.2.tar.gz", hash = "sha256:7ea2d48322cc7c0f8b3a215ed73eabd7b5d75d0b50e31ab006286ccff9e00b8f"}, +] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6a2a4b8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[tool.poetry] +name = "web-moderator-site" +version = "0.1.0" +description = "" +authors = ["hok7z "] + +[tool.poetry.dependencies] +python = "^3.10" +Flask = "^2.2.2" +peewee = "^3.15.2" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/static/css/login.css b/static/css/login.css new file mode 100644 index 0000000..e69de29 diff --git a/static/css/main.css b/static/css/main.css new file mode 100644 index 0000000..e69de29 diff --git a/templates/admin.html b/templates/admin.html new file mode 100644 index 0000000..9e67ca7 --- /dev/null +++ b/templates/admin.html @@ -0,0 +1,13 @@ + + + + + + Web group moderator + + + + Admin panel + + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..e69de29 diff --git a/templates/login.html b/templates/login.html new file mode 100644 index 0000000..89c87eb --- /dev/null +++ b/templates/login.html @@ -0,0 +1,3 @@ + + +Login page