diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index f8cb978..38a25fa 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,26 +11,26 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.12' + - uses: pre-commit/action@v3.0.1 migrations: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - cache: "pipenv" + + - name: Install uv + uses: astral-sh/setup-uv@v6 + - name: Install Dependencies - run: | - python -m pip install --upgrade pipenv - pipenv sync + run: uv sync --locked + - name: Test for missing migrations - run: pipenv run python manage.py makemigrations --check + run: uv run python manage.py makemigrations --check env: DEBUG: True DATABASE_URL: "sqlite://:memory:" @@ -39,4 +39,3 @@ jobs: RECAPTCHA_PUBLIC: "" RECAPTCHA_PRIVATE: "" OIDC_KEY: "" - diff --git a/README.md b/README.md index bc646ee..1efbc1f 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,14 @@ verejné profily. ## Inštalácia a quick-start Na rozbehanie vývojového prostredia potrebuješ Docker. Na formátovanie kódu používame `pre-commit` hooky, ktoré je vhodné -si nainštalovať. `pre-commit` je uvedený aj v `Pipfile` pre rýchlu inštaláciu. +si nainštalovať. ```bash -pipenv install --dev -pipenv run pre-commit install +uv sync --dev +uv run pre-commit install ``` -Development server si vieš spustiť nasledovným príkazom. Trojsten ID by sa ti mal zjaviť na http://localhost:8000. +Development server si vieš spustiť nasledovným príkazom. Trojsten ID by sa ti mal zjaviť na http://localhost:8000. Niekedy je potrebné rebuildnúť image (napr. pri zmenách Python dependencies), vtedy treba použiť prepínač `--build`. ```bash diff --git a/manage.py b/manage.py index f60cd76..cb0320a 100755 --- a/manage.py +++ b/manage.py @@ -1,5 +1,6 @@ #!/usr/bin/env python """Django's command-line utility for administrative tasks.""" + import os import sys diff --git a/package.json b/package.json index 81b4578..0043bcd 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "css-prod": "npx @tailwindcss/cli -i trojstenid/app.css -o trojstenid/users/static/app.css --minify" }, "dependencies": { - "@tailwindcss/cli": "^4.1.5", + "@tailwindcss/cli": "^4.1.11", "@tailwindcss/forms": "^0.5.10", - "tailwindcss": "^4.1.5" + "tailwindcss": "^4.1.11" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b2150a..c4e1411 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,17 +9,38 @@ importers: .: dependencies: '@tailwindcss/cli': - specifier: ^4.1.5 - version: 4.1.5 + specifier: ^4.1.11 + version: 4.1.11 '@tailwindcss/forms': specifier: ^0.5.10 - version: 0.5.10(tailwindcss@4.1.5) + version: 0.5.10(tailwindcss@4.1.11) tailwindcss: - specifier: ^4.1.5 - version: 4.1.5 + specifier: ^4.1.11 + version: 4.1.11 packages: + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + + '@isaacs/fs-minipass@4.0.1': + resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} + engines: {node: '>=18.0.0'} + + '@jridgewell/gen-mapping@0.3.12': + resolution: {integrity: sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.4': + resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==} + + '@jridgewell/trace-mapping@0.3.29': + resolution: {integrity: sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==} + '@parcel/watcher-android-arm64@2.5.1': resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==} engines: {node: '>= 10.0.0'} @@ -102,8 +123,8 @@ packages: resolution: {integrity: sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==} engines: {node: '>= 10.0.0'} - '@tailwindcss/cli@4.1.5': - resolution: {integrity: sha512-Kr567rDwDjY1VUnfqh5/+DCpRf4B8lPs5O9flP4kri7n4AM2aubrIxGSh5GN8s+awUKw/U4+6kNlEnZbBNfUeg==} + '@tailwindcss/cli@4.1.11': + resolution: {integrity: sha512-7RAFOrVaXCFz5ooEG36Kbh+sMJiI2j4+Ozp71smgjnLfBRu7DTfoq8DsTvzse2/6nDeo2M3vS/FGaxfDgr3rtQ==} hasBin: true '@tailwindcss/forms@0.5.10': @@ -111,65 +132,65 @@ packages: peerDependencies: tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1' - '@tailwindcss/node@4.1.5': - resolution: {integrity: sha512-CBhSWo0vLnWhXIvpD0qsPephiaUYfHUX3U9anwDaHZAeuGpTiB3XmsxPAN6qX7bFhipyGBqOa1QYQVVhkOUGxg==} + '@tailwindcss/node@4.1.11': + resolution: {integrity: sha512-yzhzuGRmv5QyU9qLNg4GTlYI6STedBWRE7NjxP45CsFYYq9taI0zJXZBMqIC/c8fViNLhmrbpSFS57EoxUmD6Q==} - '@tailwindcss/oxide-android-arm64@4.1.5': - resolution: {integrity: sha512-LVvM0GirXHED02j7hSECm8l9GGJ1RfgpWCW+DRn5TvSaxVsv28gRtoL4aWKGnXqwvI3zu1GABeDNDVZeDPOQrw==} + '@tailwindcss/oxide-android-arm64@4.1.11': + resolution: {integrity: sha512-3IfFuATVRUMZZprEIx9OGDjG3Ou3jG4xQzNTvjDoKmU9JdmoCohQJ83MYd0GPnQIu89YoJqvMM0G3uqLRFtetg==} engines: {node: '>= 10'} cpu: [arm64] os: [android] - '@tailwindcss/oxide-darwin-arm64@4.1.5': - resolution: {integrity: sha512-//TfCA3pNrgnw4rRJOqavW7XUk8gsg9ddi8cwcsWXp99tzdBAZW0WXrD8wDyNbqjW316Pk2hiN/NJx/KWHl8oA==} + '@tailwindcss/oxide-darwin-arm64@4.1.11': + resolution: {integrity: sha512-ESgStEOEsyg8J5YcMb1xl8WFOXfeBmrhAwGsFxxB2CxY9evy63+AtpbDLAyRkJnxLy2WsD1qF13E97uQyP1lfQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@tailwindcss/oxide-darwin-x64@4.1.5': - resolution: {integrity: sha512-XQorp3Q6/WzRd9OalgHgaqgEbjP3qjHrlSUb5k1EuS1Z9NE9+BbzSORraO+ecW432cbCN7RVGGL/lSnHxcd+7Q==} + '@tailwindcss/oxide-darwin-x64@4.1.11': + resolution: {integrity: sha512-EgnK8kRchgmgzG6jE10UQNaH9Mwi2n+yw1jWmof9Vyg2lpKNX2ioe7CJdf9M5f8V9uaQxInenZkOxnTVL3fhAw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@tailwindcss/oxide-freebsd-x64@4.1.5': - resolution: {integrity: sha512-bPrLWbxo8gAo97ZmrCbOdtlz/Dkuy8NK97aFbVpkJ2nJ2Jo/rsCbu0TlGx8joCuA3q6vMWTSn01JY46iwG+clg==} + '@tailwindcss/oxide-freebsd-x64@4.1.11': + resolution: {integrity: sha512-xdqKtbpHs7pQhIKmqVpxStnY1skuNh4CtbcyOHeX1YBE0hArj2romsFGb6yUmzkq/6M24nkxDqU8GYrKrz+UcA==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.5': - resolution: {integrity: sha512-1gtQJY9JzMAhgAfvd/ZaVOjh/Ju/nCoAsvOVJenWZfs05wb8zq+GOTnZALWGqKIYEtyNpCzvMk+ocGpxwdvaVg==} + '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.11': + resolution: {integrity: sha512-ryHQK2eyDYYMwB5wZL46uoxz2zzDZsFBwfjssgB7pzytAeCCa6glsiJGjhTEddq/4OsIjsLNMAiMlHNYnkEEeg==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@tailwindcss/oxide-linux-arm64-gnu@4.1.5': - resolution: {integrity: sha512-dtlaHU2v7MtdxBXoqhxwsWjav7oim7Whc6S9wq/i/uUMTWAzq/gijq1InSgn2yTnh43kR+SFvcSyEF0GCNu1PQ==} + '@tailwindcss/oxide-linux-arm64-gnu@4.1.11': + resolution: {integrity: sha512-mYwqheq4BXF83j/w75ewkPJmPZIqqP1nhoghS9D57CLjsh3Nfq0m4ftTotRYtGnZd3eCztgbSPJ9QhfC91gDZQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@tailwindcss/oxide-linux-arm64-musl@4.1.5': - resolution: {integrity: sha512-fg0F6nAeYcJ3CriqDT1iVrqALMwD37+sLzXs8Rjy8Z1ZHshJoYceodfyUwGJEsQoTyWbliFNRs2wMQNXtT7MVA==} + '@tailwindcss/oxide-linux-arm64-musl@4.1.11': + resolution: {integrity: sha512-m/NVRFNGlEHJrNVk3O6I9ggVuNjXHIPoD6bqay/pubtYC9QIdAMpS+cswZQPBLvVvEF6GtSNONbDkZrjWZXYNQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@tailwindcss/oxide-linux-x64-gnu@4.1.5': - resolution: {integrity: sha512-SO+F2YEIAHa1AITwc8oPwMOWhgorPzzcbhWEb+4oLi953h45FklDmM8dPSZ7hNHpIk9p/SCZKUYn35t5fjGtHA==} + '@tailwindcss/oxide-linux-x64-gnu@4.1.11': + resolution: {integrity: sha512-YW6sblI7xukSD2TdbbaeQVDysIm/UPJtObHJHKxDEcW2exAtY47j52f8jZXkqE1krdnkhCMGqP3dbniu1Te2Fg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@tailwindcss/oxide-linux-x64-musl@4.1.5': - resolution: {integrity: sha512-6UbBBplywkk/R+PqqioskUeXfKcBht3KU7juTi1UszJLx0KPXUo10v2Ok04iBJIaDPkIFkUOVboXms5Yxvaz+g==} + '@tailwindcss/oxide-linux-x64-musl@4.1.11': + resolution: {integrity: sha512-e3C/RRhGunWYNC3aSF7exsQkdXzQ/M+aYuZHKnw4U7KQwTJotnWsGOIVih0s2qQzmEzOFIJ3+xt7iq67K/p56Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@tailwindcss/oxide-wasm32-wasi@4.1.5': - resolution: {integrity: sha512-hwALf2K9FHuiXTPqmo1KeOb83fTRNbe9r/Ixv9ZNQ/R24yw8Ge1HOWDDgTdtzntIaIUJG5dfXCf4g9AD4RiyhQ==} + '@tailwindcss/oxide-wasm32-wasi@4.1.11': + resolution: {integrity: sha512-Xo1+/GU0JEN/C/dvcammKHzeM6NqKovG+6921MR6oadee5XPBaKOumrJCXvopJ/Qb5TH7LX/UAywbqrP4lax0g==} engines: {node: '>=14.0.0'} cpu: [wasm32] bundledDependencies: @@ -180,26 +201,30 @@ packages: - '@emnapi/wasi-threads' - tslib - '@tailwindcss/oxide-win32-arm64-msvc@4.1.5': - resolution: {integrity: sha512-oDKncffWzaovJbkuR7/OTNFRJQVdiw/n8HnzaCItrNQUeQgjy7oUiYpsm9HUBgpmvmDpSSbGaCa2Evzvk3eFmA==} + '@tailwindcss/oxide-win32-arm64-msvc@4.1.11': + resolution: {integrity: sha512-UgKYx5PwEKrac3GPNPf6HVMNhUIGuUh4wlDFR2jYYdkX6pL/rn73zTq/4pzUm8fOjAn5L8zDeHp9iXmUGOXZ+w==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@tailwindcss/oxide-win32-x64-msvc@4.1.5': - resolution: {integrity: sha512-WiR4dtyrFdbb+ov0LK+7XsFOsG+0xs0PKZKkt41KDn9jYpO7baE3bXiudPVkTqUEwNfiglCygQHl2jklvSBi7Q==} + '@tailwindcss/oxide-win32-x64-msvc@4.1.11': + resolution: {integrity: sha512-YfHoggn1j0LK7wR82TOucWc5LDCguHnoS879idHekmmiR7g9HUtMw9MI0NHatS28u/Xlkfi9w5RJWgz2Dl+5Qg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@tailwindcss/oxide@4.1.5': - resolution: {integrity: sha512-1n4br1znquEvyW/QuqMKQZlBen+jxAbvyduU87RS8R3tUSvByAkcaMTkJepNIrTlYhD+U25K4iiCIxE6BGdRYA==} + '@tailwindcss/oxide@4.1.11': + resolution: {integrity: sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg==} engines: {node: '>= 10'} braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} + chownr@3.0.0: + resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} + engines: {node: '>=18'} + detect-libc@1.0.3: resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} engines: {node: '>=0.10'} @@ -209,8 +234,8 @@ packages: resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} engines: {node: '>=8'} - enhanced-resolve@5.18.1: - resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} + enhanced-resolve@5.18.2: + resolution: {integrity: sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==} engines: {node: '>=10.13.0'} fill-range@7.1.1: @@ -232,74 +257,77 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - jiti@2.4.2: - resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + jiti@2.5.1: + resolution: {integrity: sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==} hasBin: true - lightningcss-darwin-arm64@1.29.2: - resolution: {integrity: sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==} + lightningcss-darwin-arm64@1.30.1: + resolution: {integrity: sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] - lightningcss-darwin-x64@1.29.2: - resolution: {integrity: sha512-j5qYxamyQw4kDXX5hnnCKMf3mLlHvG44f24Qyi2965/Ycz829MYqjrVg2H8BidybHBp9kom4D7DR5VqCKDXS0w==} + lightningcss-darwin-x64@1.30.1: + resolution: {integrity: sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] - lightningcss-freebsd-x64@1.29.2: - resolution: {integrity: sha512-wDk7M2tM78Ii8ek9YjnY8MjV5f5JN2qNVO+/0BAGZRvXKtQrBC4/cn4ssQIpKIPP44YXw6gFdpUF+Ps+RGsCwg==} + lightningcss-freebsd-x64@1.30.1: + resolution: {integrity: sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [freebsd] - lightningcss-linux-arm-gnueabihf@1.29.2: - resolution: {integrity: sha512-IRUrOrAF2Z+KExdExe3Rz7NSTuuJ2HvCGlMKoquK5pjvo2JY4Rybr+NrKnq0U0hZnx5AnGsuFHjGnNT14w26sg==} + lightningcss-linux-arm-gnueabihf@1.30.1: + resolution: {integrity: sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] - lightningcss-linux-arm64-gnu@1.29.2: - resolution: {integrity: sha512-KKCpOlmhdjvUTX/mBuaKemp0oeDIBBLFiU5Fnqxh1/DZ4JPZi4evEH7TKoSBFOSOV3J7iEmmBaw/8dpiUvRKlQ==} + lightningcss-linux-arm64-gnu@1.30.1: + resolution: {integrity: sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - lightningcss-linux-arm64-musl@1.29.2: - resolution: {integrity: sha512-Q64eM1bPlOOUgxFmoPUefqzY1yV3ctFPE6d/Vt7WzLW4rKTv7MyYNky+FWxRpLkNASTnKQUaiMJ87zNODIrrKQ==} + lightningcss-linux-arm64-musl@1.30.1: + resolution: {integrity: sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - lightningcss-linux-x64-gnu@1.29.2: - resolution: {integrity: sha512-0v6idDCPG6epLXtBH/RPkHvYx74CVziHo6TMYga8O2EiQApnUPZsbR9nFNrg2cgBzk1AYqEd95TlrsL7nYABQg==} + lightningcss-linux-x64-gnu@1.30.1: + resolution: {integrity: sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - lightningcss-linux-x64-musl@1.29.2: - resolution: {integrity: sha512-rMpz2yawkgGT8RULc5S4WiZopVMOFWjiItBT7aSfDX4NQav6M44rhn5hjtkKzB+wMTRlLLqxkeYEtQ3dd9696w==} + lightningcss-linux-x64-musl@1.30.1: + resolution: {integrity: sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - lightningcss-win32-arm64-msvc@1.29.2: - resolution: {integrity: sha512-nL7zRW6evGQqYVu/bKGK+zShyz8OVzsCotFgc7judbt6wnB2KbiKKJwBE4SGoDBQ1O94RjW4asrCjQL4i8Fhbw==} + lightningcss-win32-arm64-msvc@1.30.1: + resolution: {integrity: sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [win32] - lightningcss-win32-x64-msvc@1.29.2: - resolution: {integrity: sha512-EdIUW3B2vLuHmv7urfzMI/h2fmlnOQBk1xlsDxkN1tCWKjNFjfLhGxYk8C8mzpSfr+A6jFFIi8fU6LbQGsRWjA==} + lightningcss-win32-x64-msvc@1.30.1: + resolution: {integrity: sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] - lightningcss@1.29.2: - resolution: {integrity: sha512-6b6gd/RUXKaw5keVdSEtqFVdzWnU5jMxTUjA2bVcMNPLwSQ08Sv/UodBVtETLCn7k4S1Ibxwh7k68IwLZPgKaA==} + lightningcss@1.30.1: + resolution: {integrity: sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==} engines: {node: '>= 12.0.0'} + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + micromatch@4.0.8: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} @@ -308,6 +336,19 @@ packages: resolution: {integrity: sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==} hasBin: true + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + minizlib@3.0.2: + resolution: {integrity: sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==} + engines: {node: '>= 18'} + + mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} + engines: {node: '>=10'} + hasBin: true + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -322,19 +363,54 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - tailwindcss@4.1.5: - resolution: {integrity: sha512-nYtSPfWGDiWgCkwQG/m+aX83XCwf62sBgg3bIlNiiOcggnS1x3uVRDAuyelBFL+vJdOPPCGElxv9DjHJjRHiVA==} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} - tapable@2.2.1: - resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + tailwindcss@4.1.11: + resolution: {integrity: sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==} + + tapable@2.2.2: + resolution: {integrity: sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==} engines: {node: '>=6'} + tar@7.4.3: + resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} + engines: {node: '>=18'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + yallist@5.0.0: + resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} + engines: {node: '>=18'} + snapshots: + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.12 + '@jridgewell/trace-mapping': 0.3.29 + + '@isaacs/fs-minipass@4.0.1': + dependencies: + minipass: 7.1.2 + + '@jridgewell/gen-mapping@0.3.12': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.4 + '@jridgewell/trace-mapping': 0.3.29 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.4': {} + + '@jridgewell/trace-mapping@0.3.29': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.4 + '@parcel/watcher-android-arm64@2.5.1': optional: true @@ -395,91 +471,99 @@ snapshots: '@parcel/watcher-win32-ia32': 2.5.1 '@parcel/watcher-win32-x64': 2.5.1 - '@tailwindcss/cli@4.1.5': + '@tailwindcss/cli@4.1.11': dependencies: '@parcel/watcher': 2.5.1 - '@tailwindcss/node': 4.1.5 - '@tailwindcss/oxide': 4.1.5 - enhanced-resolve: 5.18.1 + '@tailwindcss/node': 4.1.11 + '@tailwindcss/oxide': 4.1.11 + enhanced-resolve: 5.18.2 mri: 1.2.0 picocolors: 1.1.1 - tailwindcss: 4.1.5 + tailwindcss: 4.1.11 - '@tailwindcss/forms@0.5.10(tailwindcss@4.1.5)': + '@tailwindcss/forms@0.5.10(tailwindcss@4.1.11)': dependencies: mini-svg-data-uri: 1.4.4 - tailwindcss: 4.1.5 + tailwindcss: 4.1.11 - '@tailwindcss/node@4.1.5': + '@tailwindcss/node@4.1.11': dependencies: - enhanced-resolve: 5.18.1 - jiti: 2.4.2 - lightningcss: 1.29.2 - tailwindcss: 4.1.5 + '@ampproject/remapping': 2.3.0 + enhanced-resolve: 5.18.2 + jiti: 2.5.1 + lightningcss: 1.30.1 + magic-string: 0.30.17 + source-map-js: 1.2.1 + tailwindcss: 4.1.11 - '@tailwindcss/oxide-android-arm64@4.1.5': + '@tailwindcss/oxide-android-arm64@4.1.11': optional: true - '@tailwindcss/oxide-darwin-arm64@4.1.5': + '@tailwindcss/oxide-darwin-arm64@4.1.11': optional: true - '@tailwindcss/oxide-darwin-x64@4.1.5': + '@tailwindcss/oxide-darwin-x64@4.1.11': optional: true - '@tailwindcss/oxide-freebsd-x64@4.1.5': + '@tailwindcss/oxide-freebsd-x64@4.1.11': optional: true - '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.5': + '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.11': optional: true - '@tailwindcss/oxide-linux-arm64-gnu@4.1.5': + '@tailwindcss/oxide-linux-arm64-gnu@4.1.11': optional: true - '@tailwindcss/oxide-linux-arm64-musl@4.1.5': + '@tailwindcss/oxide-linux-arm64-musl@4.1.11': optional: true - '@tailwindcss/oxide-linux-x64-gnu@4.1.5': + '@tailwindcss/oxide-linux-x64-gnu@4.1.11': optional: true - '@tailwindcss/oxide-linux-x64-musl@4.1.5': + '@tailwindcss/oxide-linux-x64-musl@4.1.11': optional: true - '@tailwindcss/oxide-wasm32-wasi@4.1.5': + '@tailwindcss/oxide-wasm32-wasi@4.1.11': optional: true - '@tailwindcss/oxide-win32-arm64-msvc@4.1.5': + '@tailwindcss/oxide-win32-arm64-msvc@4.1.11': optional: true - '@tailwindcss/oxide-win32-x64-msvc@4.1.5': + '@tailwindcss/oxide-win32-x64-msvc@4.1.11': optional: true - '@tailwindcss/oxide@4.1.5': + '@tailwindcss/oxide@4.1.11': + dependencies: + detect-libc: 2.0.4 + tar: 7.4.3 optionalDependencies: - '@tailwindcss/oxide-android-arm64': 4.1.5 - '@tailwindcss/oxide-darwin-arm64': 4.1.5 - '@tailwindcss/oxide-darwin-x64': 4.1.5 - '@tailwindcss/oxide-freebsd-x64': 4.1.5 - '@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.5 - '@tailwindcss/oxide-linux-arm64-gnu': 4.1.5 - '@tailwindcss/oxide-linux-arm64-musl': 4.1.5 - '@tailwindcss/oxide-linux-x64-gnu': 4.1.5 - '@tailwindcss/oxide-linux-x64-musl': 4.1.5 - '@tailwindcss/oxide-wasm32-wasi': 4.1.5 - '@tailwindcss/oxide-win32-arm64-msvc': 4.1.5 - '@tailwindcss/oxide-win32-x64-msvc': 4.1.5 + '@tailwindcss/oxide-android-arm64': 4.1.11 + '@tailwindcss/oxide-darwin-arm64': 4.1.11 + '@tailwindcss/oxide-darwin-x64': 4.1.11 + '@tailwindcss/oxide-freebsd-x64': 4.1.11 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.11 + '@tailwindcss/oxide-linux-arm64-gnu': 4.1.11 + '@tailwindcss/oxide-linux-arm64-musl': 4.1.11 + '@tailwindcss/oxide-linux-x64-gnu': 4.1.11 + '@tailwindcss/oxide-linux-x64-musl': 4.1.11 + '@tailwindcss/oxide-wasm32-wasi': 4.1.11 + '@tailwindcss/oxide-win32-arm64-msvc': 4.1.11 + '@tailwindcss/oxide-win32-x64-msvc': 4.1.11 braces@3.0.3: dependencies: fill-range: 7.1.1 + chownr@3.0.0: {} + detect-libc@1.0.3: {} detect-libc@2.0.4: {} - enhanced-resolve@5.18.1: + enhanced-resolve@5.18.2: dependencies: graceful-fs: 4.2.11 - tapable: 2.2.1 + tapable: 2.2.2 fill-range@7.1.1: dependencies: @@ -495,52 +579,56 @@ snapshots: is-number@7.0.0: {} - jiti@2.4.2: {} + jiti@2.5.1: {} - lightningcss-darwin-arm64@1.29.2: + lightningcss-darwin-arm64@1.30.1: optional: true - lightningcss-darwin-x64@1.29.2: + lightningcss-darwin-x64@1.30.1: optional: true - lightningcss-freebsd-x64@1.29.2: + lightningcss-freebsd-x64@1.30.1: optional: true - lightningcss-linux-arm-gnueabihf@1.29.2: + lightningcss-linux-arm-gnueabihf@1.30.1: optional: true - lightningcss-linux-arm64-gnu@1.29.2: + lightningcss-linux-arm64-gnu@1.30.1: optional: true - lightningcss-linux-arm64-musl@1.29.2: + lightningcss-linux-arm64-musl@1.30.1: optional: true - lightningcss-linux-x64-gnu@1.29.2: + lightningcss-linux-x64-gnu@1.30.1: optional: true - lightningcss-linux-x64-musl@1.29.2: + lightningcss-linux-x64-musl@1.30.1: optional: true - lightningcss-win32-arm64-msvc@1.29.2: + lightningcss-win32-arm64-msvc@1.30.1: optional: true - lightningcss-win32-x64-msvc@1.29.2: + lightningcss-win32-x64-msvc@1.30.1: optional: true - lightningcss@1.29.2: + lightningcss@1.30.1: dependencies: detect-libc: 2.0.4 optionalDependencies: - lightningcss-darwin-arm64: 1.29.2 - lightningcss-darwin-x64: 1.29.2 - lightningcss-freebsd-x64: 1.29.2 - lightningcss-linux-arm-gnueabihf: 1.29.2 - lightningcss-linux-arm64-gnu: 1.29.2 - lightningcss-linux-arm64-musl: 1.29.2 - lightningcss-linux-x64-gnu: 1.29.2 - lightningcss-linux-x64-musl: 1.29.2 - lightningcss-win32-arm64-msvc: 1.29.2 - lightningcss-win32-x64-msvc: 1.29.2 + lightningcss-darwin-arm64: 1.30.1 + lightningcss-darwin-x64: 1.30.1 + lightningcss-freebsd-x64: 1.30.1 + lightningcss-linux-arm-gnueabihf: 1.30.1 + lightningcss-linux-arm64-gnu: 1.30.1 + lightningcss-linux-arm64-musl: 1.30.1 + lightningcss-linux-x64-gnu: 1.30.1 + lightningcss-linux-x64-musl: 1.30.1 + lightningcss-win32-arm64-msvc: 1.30.1 + lightningcss-win32-x64-msvc: 1.30.1 + + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.4 micromatch@4.0.8: dependencies: @@ -549,6 +637,14 @@ snapshots: mini-svg-data-uri@1.4.4: {} + minipass@7.1.2: {} + + minizlib@3.0.2: + dependencies: + minipass: 7.1.2 + + mkdirp@3.0.1: {} + mri@1.2.0: {} node-addon-api@7.1.1: {} @@ -557,10 +653,23 @@ snapshots: picomatch@2.3.1: {} - tailwindcss@4.1.5: {} + source-map-js@1.2.1: {} - tapable@2.2.1: {} + tailwindcss@4.1.11: {} + + tapable@2.2.2: {} + + tar@7.4.3: + dependencies: + '@isaacs/fs-minipass': 4.0.1 + chownr: 3.0.0 + minipass: 7.1.2 + minizlib: 3.0.2 + mkdirp: 3.0.1 + yallist: 5.0.0 to-regex-range@5.0.1: dependencies: is-number: 7.0.0 + + yallist@5.0.0: {} diff --git a/trojstenid/app.css b/trojstenid/app.css index b45281a..130dc6b 100644 --- a/trojstenid/app.css +++ b/trojstenid/app.css @@ -33,7 +33,7 @@ } .btn { - @apply flex w-full; + @apply flex w-full cursor-pointer; } .btn-blue { @@ -53,11 +53,11 @@ } .input-checkbox { - @apply h-4 w-4 rounded-sm border-gray-300 text-blue-500 focus:ring-blue-500; + @apply h-4 w-4 rounded-sm border-gray-300 text-blue-500 cursor-pointer focus:ring-blue-500; } .input-radio { - @apply h-4 w-4 rounded-full border-gray-300 text-blue-500 focus:ring-blue-500; + @apply h-4 w-4 rounded-full border-gray-300 text-blue-500 cursor-pointer focus:ring-blue-500; } [x-cloak] { diff --git a/trojstenid/badges/migrations/0001_initial.py b/trojstenid/badges/migrations/0001_initial.py index 9b53f92..bc8a9b8 100644 --- a/trojstenid/badges/migrations/0001_initial.py +++ b/trojstenid/badges/migrations/0001_initial.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/trojstenid/badges/models.py b/trojstenid/badges/models.py index 0d064ac..822c460 100644 --- a/trojstenid/badges/models.py +++ b/trojstenid/badges/models.py @@ -4,6 +4,8 @@ class BadgeGroup(models.Model): + id: int + title = models.CharField(max_length=100) class Meta: @@ -14,6 +16,8 @@ def __str__(self): class Badge(models.Model): + id: int + image = models.ImageField() title = models.CharField(max_length=100) description = models.CharField(max_length=300) @@ -28,6 +32,8 @@ def __str__(self): class BadgeAssignment(models.Model): + id: int + badge = models.ForeignKey(Badge, on_delete=models.CASCADE) user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) created_at = models.DateTimeField(auto_now_add=True) @@ -36,3 +42,6 @@ class Meta: constraints = [ UniqueConstraint("badge", "user", name="badge_assignment__unique"), ] + + def __str__(self): + return f"{self.user} - {self.badge}" diff --git a/trojstenid/profiles/templates/profile/profile.html b/trojstenid/profiles/templates/profile/profile.html index cc5361b..533e89e 100644 --- a/trojstenid/profiles/templates/profile/profile.html +++ b/trojstenid/profiles/templates/profile/profile.html @@ -50,4 +50,4 @@

Žiadne odznaky

{% endif %} -{% endblock %} +{% endblock body %} diff --git a/trojstenid/profiles/views.py b/trojstenid/profiles/views.py index fa9495c..8012638 100644 --- a/trojstenid/profiles/views.py +++ b/trojstenid/profiles/views.py @@ -22,13 +22,13 @@ def get(self, request, *args, **kwargs): return super().get(request, *args, **kwargs) def get_text_color(self, background: str) -> str: - r, g, b = ImageColor.getrgb(background) + r, g, b, *_ = ImageColor.getrgb(background) return "#000000" if (r * 0.299 + g * 0.587 + b * 0.114) > 150 else "#ffffff" def get_context_data(self, **kwargs): initials = "".join([x[0] for x in self._user.get_full_name().split()]).upper() ctx = super().get_context_data(**kwargs) - hue = random.Random(self._user.id).randint(0, 360) + hue = random.Random(self._user.id).randint(0, 360) # noqa: S311 background = ImageColor.getrgb(f"hsl({hue}, 100%, 60%)") background = "#" + "".join([f"{x:02x}" for x in background]) diff --git a/trojstenid/schools/migrations/0001_initial.py b/trojstenid/schools/migrations/0001_initial.py index b3eca51..004ca7e 100644 --- a/trojstenid/schools/migrations/0001_initial.py +++ b/trojstenid/schools/migrations/0001_initial.py @@ -7,7 +7,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ @@ -16,36 +15,85 @@ class Migration(migrations.Migration): operations = [ migrations.CreateModel( - name='SchoolType', + name="SchoolType", fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('identifier', models.CharField(max_length=32, unique=True)), - ('name', models.CharField(max_length=128)), - ('short', models.CharField(max_length=128)), - ('years', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=64), blank=True, size=None)), + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("identifier", models.CharField(max_length=32, unique=True)), + ("name", models.CharField(max_length=128)), + ("short", models.CharField(max_length=128)), + ( + "years", + django.contrib.postgres.fields.ArrayField( + base_field=models.CharField(max_length=64), + blank=True, + size=None, + ), + ), ], ), migrations.CreateModel( - name='School', + name="School", fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('eduid', models.IntegerField(blank=True, null=True, unique=True)), - ('name', models.CharField(max_length=256)), - ('address', models.CharField(blank=True, max_length=256)), - ('is_selectable', models.BooleanField(default=True)), - ('types', models.ManyToManyField(to='trojstenid_schools.schooltype')), + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("eduid", models.IntegerField(blank=True, null=True, unique=True)), + ("name", models.CharField(max_length=256)), + ("address", models.CharField(blank=True, max_length=256)), + ("is_selectable", models.BooleanField(default=True)), + ("types", models.ManyToManyField(to="trojstenid_schools.schooltype")), ], ), migrations.CreateModel( - name='UserSchoolRecord', + name="UserSchoolRecord", fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('start_date', models.DateField()), - ('start_year', models.PositiveIntegerField(default=0)), - ('end_date', models.DateField(blank=True, null=True)), - ('school', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='trojstenid_schools.school')), - ('school_type', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='trojstenid_schools.schooltype')), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("start_date", models.DateField()), + ("start_year", models.PositiveIntegerField(default=0)), + ("end_date", models.DateField(blank=True, null=True)), + ( + "school", + models.ForeignKey( + on_delete=django.db.models.deletion.RESTRICT, + to="trojstenid_schools.school", + ), + ), + ( + "school_type", + models.ForeignKey( + on_delete=django.db.models.deletion.RESTRICT, + to="trojstenid_schools.schooltype", + ), + ), + ( + "user", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + to=settings.AUTH_USER_MODEL, + ), + ), ], ), ] diff --git a/trojstenid/schools/services/school_sync.py b/trojstenid/schools/services/school_sync.py index 374f740..a85be82 100644 --- a/trojstenid/schools/services/school_sync.py +++ b/trojstenid/schools/services/school_sync.py @@ -57,7 +57,7 @@ def create_null_school(): @transaction.atomic def sync_schools(): - resp = requests.get(SCHOOL_DB_URL) + resp = requests.get(SCHOOL_DB_URL, timeout=60) resp.raise_for_status() reader = csv.DictReader(io.StringIO(resp.text)) diff --git a/trojstenid/schools/templates/settings/school_list.html b/trojstenid/schools/templates/settings/school_list.html index bf60176..b4e3ebf 100644 --- a/trojstenid/schools/templates/settings/school_list.html +++ b/trojstenid/schools/templates/settings/school_list.html @@ -40,4 +40,4 @@

Informácie o školách

Zmeniť informácie o škole -{% endblock %} +{% endblock content %} diff --git a/trojstenid/schools/templates/settings/school_search.html b/trojstenid/schools/templates/settings/school_search.html index 85d81ca..b0b46da 100644 --- a/trojstenid/schools/templates/settings/school_search.html +++ b/trojstenid/schools/templates/settings/school_search.html @@ -1,5 +1,5 @@ {% for school in schools %} -{{school}} +{{ school }} {% endfor %} Moja škola nie je v zozname. diff --git a/trojstenid/schools/utils.py b/trojstenid/schools/utils.py index 8c9b7c5..d48be80 100644 --- a/trojstenid/schools/utils.py +++ b/trojstenid/schools/utils.py @@ -14,4 +14,3 @@ def academic_year_start(year: int) -> date: def academic_year_end(year: int) -> date: return date(year + 1, 8, 31) - diff --git a/trojstenid/users/migrations/0001_initial.py b/trojstenid/users/migrations/0001_initial.py index 1e55099..119e7c3 100644 --- a/trojstenid/users/migrations/0001_initial.py +++ b/trojstenid/users/migrations/0001_initial.py @@ -7,7 +7,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/trojstenid/users/migrations/0002_application.py b/trojstenid/users/migrations/0002_application.py index 0e6e9ba..44b9084 100644 --- a/trojstenid/users/migrations/0002_application.py +++ b/trojstenid/users/migrations/0002_application.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [ ("users", "0001_initial"), ] diff --git a/trojstenid/users/migrations/0003_user_avatar_file.py b/trojstenid/users/migrations/0003_user_avatar_file.py index 9d5ea89..38085c8 100644 --- a/trojstenid/users/migrations/0003_user_avatar_file.py +++ b/trojstenid/users/migrations/0003_user_avatar_file.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("users", "0002_application"), ] diff --git a/trojstenid/users/migrations/0004_alter_user_avatar_file.py b/trojstenid/users/migrations/0004_alter_user_avatar_file.py index 2d8fb87..85014b8 100644 --- a/trojstenid/users/migrations/0004_alter_user_avatar_file.py +++ b/trojstenid/users/migrations/0004_alter_user_avatar_file.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("users", "0003_user_avatar_file"), ] diff --git a/trojstenid/users/migrations/0005_application_post_logout_redirect_uris.py b/trojstenid/users/migrations/0005_application_post_logout_redirect_uris.py index 1d3406a..08cd820 100644 --- a/trojstenid/users/migrations/0005_application_post_logout_redirect_uris.py +++ b/trojstenid/users/migrations/0005_application_post_logout_redirect_uris.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("users", "0004_alter_user_avatar_file"), ] diff --git a/trojstenid/users/migrations/0006_application_allowed_origins_and_more.py b/trojstenid/users/migrations/0006_application_allowed_origins_and_more.py index 7f56ec6..683e037 100644 --- a/trojstenid/users/migrations/0006_application_allowed_origins_and_more.py +++ b/trojstenid/users/migrations/0006_application_allowed_origins_and_more.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("users", "0005_application_post_logout_redirect_uris"), ] diff --git a/trojstenid/users/migrations/0007_application_group.py b/trojstenid/users/migrations/0007_application_group.py index a4943b4..6c02ef2 100644 --- a/trojstenid/users/migrations/0007_application_group.py +++ b/trojstenid/users/migrations/0007_application_group.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("auth", "0012_alter_user_first_name_max_length"), ("users", "0006_application_allowed_origins_and_more"), diff --git a/trojstenid/users/models.py b/trojstenid/users/models.py index cdd90a0..95dbf1c 100644 --- a/trojstenid/users/models.py +++ b/trojstenid/users/models.py @@ -39,6 +39,8 @@ def get_db_converters(self, connection): class User(AbstractUser): + id: int + avatar_file = ImageField(upload_to=user_avatar_name, blank=True) userschoolrecord_set: "RelatedManager[UserSchoolRecord]" diff --git a/trojstenid/users/templates/_partials/navbar.html b/trojstenid/users/templates/_partials/navbar.html index 0644c24..fcdc943 100644 --- a/trojstenid/users/templates/_partials/navbar.html +++ b/trojstenid/users/templates/_partials/navbar.html @@ -1,5 +1,4 @@ -{% load settings %} -{% load static %} +{% load settings static %}
Trojsten
@@ -20,7 +19,7 @@
{% csrf_token %} -
diff --git a/trojstenid/users/templates/account/account_inactive.html b/trojstenid/users/templates/account/account_inactive.html index 2b26596..bf1c8c3 100644 --- a/trojstenid/users/templates/account/account_inactive.html +++ b/trojstenid/users/templates/account/account_inactive.html @@ -10,4 +10,4 @@

Tento účet je deaktivovaný. Kontaktuj nás, ak si myslíš, že ide o chybu.

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/email.html b/trojstenid/users/templates/account/email.html index 951ae55..13f79f1 100644 --- a/trojstenid/users/templates/account/email.html +++ b/trojstenid/users/templates/account/email.html @@ -61,4 +61,4 @@

Pridať novú e-mailovú adresu

{% endif %} -{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/email/account_already_exists_message.txt b/trojstenid/users/templates/account/email/account_already_exists_message.txt index a76cc6e..49a8bbe 100644 --- a/trojstenid/users/templates/account/email/account_already_exists_message.txt +++ b/trojstenid/users/templates/account/email/account_already_exists_message.txt @@ -7,4 +7,4 @@ Účet používajúci túto e-mailovú adresu už ale existuje. V prípade, že si na to zabudol/zabudla, použi na obnovenie svojho účtu nasledujúci postup: -{{ password_reset_url }}{% endblock %} +{{ password_reset_url }}{% endblock content %} diff --git a/trojstenid/users/templates/account/email/email_confirmation_message.txt b/trojstenid/users/templates/account/email/email_confirmation_message.txt index 79f7368..411b9b1 100644 --- a/trojstenid/users/templates/account/email/email_confirmation_message.txt +++ b/trojstenid/users/templates/account/email/email_confirmation_message.txt @@ -3,4 +3,4 @@ {% block content %}{% user_display user as user_display %}Tento e-mail ti posielame, nakoľko používateľ {{ user_display }} uviedol túto e-mailovú adresu pri registrácií do Trojsten ID. -Pre potvrdenie tejto e-mailovej adresy klikni na nasledujúci odkaz: {{ activate_url }}{% endblock %} +Pre potvrdenie tejto e-mailovej adresy klikni na nasledujúci odkaz: {{ activate_url }}{% endblock content %} diff --git a/trojstenid/users/templates/account/email/password_reset_key_message.txt b/trojstenid/users/templates/account/email/password_reset_key_message.txt index 6cbd9bc..80a6dc4 100644 --- a/trojstenid/users/templates/account/email/password_reset_key_message.txt +++ b/trojstenid/users/templates/account/email/password_reset_key_message.txt @@ -3,4 +3,4 @@ {% block content %}Tento e-mail ti posielame, nakoľko niekto vyžiadal obnovu tvojho hesla. Ak si to nebol/nebola ty, môžeš tento e-mail ignorovať. Na obnovenie hesla klikni na nasledujúci odkaz: -{{ password_reset_url }}{% endblock %} +{{ password_reset_url }}{% endblock content %} diff --git a/trojstenid/users/templates/account/email/unknown_account_message.txt b/trojstenid/users/templates/account/email/unknown_account_message.txt index bddc539..8865736 100644 --- a/trojstenid/users/templates/account/email/unknown_account_message.txt +++ b/trojstenid/users/templates/account/email/unknown_account_message.txt @@ -7,4 +7,4 @@ Tento e-mail môžeš ignorovať, ak si nepožiadal o obnovenie hesla. Ak si to bol ty, môžeš si zaregistrovať účet pomocou linku nižšie. -{{ signup_url }}{% endblock %} +{{ signup_url }}{% endblock content %} diff --git a/trojstenid/users/templates/account/email_confirm.html b/trojstenid/users/templates/account/email_confirm.html index 967aa19..f76b5c0 100644 --- a/trojstenid/users/templates/account/email_confirm.html +++ b/trojstenid/users/templates/account/email_confirm.html @@ -25,4 +25,4 @@

nový potvrdzovací e-mail.

{% endif %} -{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/login.html b/trojstenid/users/templates/account/login.html index 1e93150..96b3fa6 100644 --- a/trojstenid/users/templates/account/login.html +++ b/trojstenid/users/templates/account/login.html @@ -1,7 +1,5 @@ {% extends "auth_base.html" %} -{% load socialaccount %} -{% load widget_tweaks %} -{% load forms %} +{% load forms socialaccount widget_tweaks %} {% block title %}Prihlásiť sa - {{ block.super }}{% endblock %} @@ -57,4 +55,4 @@

Nemáš účet? Zaregistruj sa

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/logout.html b/trojstenid/users/templates/account/logout.html index 9be382e..7450166 100644 --- a/trojstenid/users/templates/account/logout.html +++ b/trojstenid/users/templates/account/logout.html @@ -21,4 +21,4 @@

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/messages/email_confirmation_sent.txt b/trojstenid/users/templates/account/messages/email_confirmation_sent.txt index 1cd7b92..599f484 100644 --- a/trojstenid/users/templates/account/messages/email_confirmation_sent.txt +++ b/trojstenid/users/templates/account/messages/email_confirmation_sent.txt @@ -1 +1 @@ -Overovací e-mail na adresu {{email}} bolo odoslaný. +Overovací e-mail na adresu {{ email }} bolo odoslaný. diff --git a/trojstenid/users/templates/account/messages/email_confirmed.txt b/trojstenid/users/templates/account/messages/email_confirmed.txt index bbe7866..8be74f7 100644 --- a/trojstenid/users/templates/account/messages/email_confirmed.txt +++ b/trojstenid/users/templates/account/messages/email_confirmed.txt @@ -1 +1 @@ -E-mailová adresa {{email}} bola overená. +E-mailová adresa {{ email }} bola overená. diff --git a/trojstenid/users/templates/account/messages/email_deleted.txt b/trojstenid/users/templates/account/messages/email_deleted.txt index 62ac721..af28e38 100644 --- a/trojstenid/users/templates/account/messages/email_deleted.txt +++ b/trojstenid/users/templates/account/messages/email_deleted.txt @@ -1 +1 @@ -E-mailová adresa {{email}} bola odstránená. +E-mailová adresa {{ email }} bola odstránená. diff --git a/trojstenid/users/templates/account/messages/logged_in.txt b/trojstenid/users/templates/account/messages/logged_in.txt index 9cfebb2..0f8884c 100644 --- a/trojstenid/users/templates/account/messages/logged_in.txt +++ b/trojstenid/users/templates/account/messages/logged_in.txt @@ -1,3 +1,3 @@ {% load account %} {% user_display user as name %} -Ahoj, {{name}}! +Ahoj, {{ name }}! diff --git a/trojstenid/users/templates/account/password_change.html b/trojstenid/users/templates/account/password_change.html index 38b0a4b..9542c49 100644 --- a/trojstenid/users/templates/account/password_change.html +++ b/trojstenid/users/templates/account/password_change.html @@ -18,4 +18,4 @@

Zmena hesla

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/password_reset.html b/trojstenid/users/templates/account/password_reset.html index e1b6052..0b40d56 100644 --- a/trojstenid/users/templates/account/password_reset.html +++ b/trojstenid/users/templates/account/password_reset.html @@ -19,4 +19,4 @@

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/password_reset_done.html b/trojstenid/users/templates/account/password_reset_done.html index 8430187..fd8ca9e 100644 --- a/trojstenid/users/templates/account/password_reset_done.html +++ b/trojstenid/users/templates/account/password_reset_done.html @@ -12,4 +12,4 @@

Na tvoj e-mail sme ti poslali pokyny k obnove hesla. Ak ti e-mail neprišiel, skontroluj si priečinok nevyžiadanej pošty. V prípade problémov nás kontaktuj.

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/password_reset_from_key.html b/trojstenid/users/templates/account/password_reset_from_key.html index b5a8158..6ac3179 100644 --- a/trojstenid/users/templates/account/password_reset_from_key.html +++ b/trojstenid/users/templates/account/password_reset_from_key.html @@ -16,4 +16,4 @@

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/password_reset_from_key_done.html b/trojstenid/users/templates/account/password_reset_from_key_done.html index 8f25317..0d5a650 100644 --- a/trojstenid/users/templates/account/password_reset_from_key_done.html +++ b/trojstenid/users/templates/account/password_reset_from_key_done.html @@ -13,4 +13,4 @@

Prihlásiť sa -{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/password_set.html b/trojstenid/users/templates/account/password_set.html index c45109a..532f750 100644 --- a/trojstenid/users/templates/account/password_set.html +++ b/trojstenid/users/templates/account/password_set.html @@ -16,4 +16,4 @@

Nastavenie hesla

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/signup.html b/trojstenid/users/templates/account/signup.html index 6a44e33..7b9b96c 100644 --- a/trojstenid/users/templates/account/signup.html +++ b/trojstenid/users/templates/account/signup.html @@ -21,4 +21,4 @@

Máš už účet? Prihlás sa

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/account/verification_sent.html b/trojstenid/users/templates/account/verification_sent.html index a666c70..4da6511 100644 --- a/trojstenid/users/templates/account/verification_sent.html +++ b/trojstenid/users/templates/account/verification_sent.html @@ -1,6 +1,5 @@ {% extends "auth_base.html" %} -{% load forms %} -{% load account %} +{% load account forms %} {% block title %}Overenie e-mailovej adresy - {{ block.super }}{% endblock %} @@ -14,4 +13,4 @@

skontroluj si priečinok nevyžiadanej pošty. V prípade problémov nás kontaktuj.

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/auth_base.html b/trojstenid/users/templates/auth_base.html index 951057f..6efc6e6 100644 --- a/trojstenid/users/templates/auth_base.html +++ b/trojstenid/users/templates/auth_base.html @@ -23,4 +23,4 @@ -{% endblock %} +{% endblock body %} diff --git a/trojstenid/users/templates/forms/input.html b/trojstenid/users/templates/forms/input.html index 8e3c698..63caf69 100644 --- a/trojstenid/users/templates/forms/input.html +++ b/trojstenid/users/templates/forms/input.html @@ -10,7 +10,7 @@
diff --git a/trojstenid/users/templates/landing.html b/trojstenid/users/templates/landing.html index 98a09a7..efdfa11 100644 --- a/trojstenid/users/templates/landing.html +++ b/trojstenid/users/templates/landing.html @@ -36,4 +36,4 @@

Jeden ú

-{% endblock %} +{% endblock body %} diff --git a/trojstenid/users/templates/oauth2_provider/authorize.html b/trojstenid/users/templates/oauth2_provider/authorize.html index f15515f..9d5d2cd 100644 --- a/trojstenid/users/templates/oauth2_provider/authorize.html +++ b/trojstenid/users/templates/oauth2_provider/authorize.html @@ -44,4 +44,4 @@

Nastala chyba pri spracovávaní požiadavky. Skús to znovu neskôr.

{% endif %} -{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/oauth2_provider/logout_confirm.html b/trojstenid/users/templates/oauth2_provider/logout_confirm.html index e345d3e..56f8372 100644 --- a/trojstenid/users/templates/oauth2_provider/logout_confirm.html +++ b/trojstenid/users/templates/oauth2_provider/logout_confirm.html @@ -42,4 +42,4 @@

Nastala chyba pri spracovávaní požiadavky. Skús to znovu neskôr.

{% endif %} -{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/settings/profile.html b/trojstenid/users/templates/settings/profile.html index f8c2cbf..0092e6f 100644 --- a/trojstenid/users/templates/settings/profile.html +++ b/trojstenid/users/templates/settings/profile.html @@ -40,4 +40,4 @@

Osobné údaje

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/settings_base.html b/trojstenid/users/templates/settings_base.html index 07e5bd7..7318537 100644 --- a/trojstenid/users/templates/settings_base.html +++ b/trojstenid/users/templates/settings_base.html @@ -69,4 +69,4 @@ -{% endblock %} +{% endblock body %} diff --git a/trojstenid/users/templates/socialaccount/authentication_error.html b/trojstenid/users/templates/socialaccount/authentication_error.html index 1b6a949..7f6ab27 100644 --- a/trojstenid/users/templates/socialaccount/authentication_error.html +++ b/trojstenid/users/templates/socialaccount/authentication_error.html @@ -11,4 +11,4 @@

Počas prihlasovania cez externý účet nastala chyba.

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/socialaccount/connections.html b/trojstenid/users/templates/socialaccount/connections.html index bb8493a..4c832e0 100644 --- a/trojstenid/users/templates/socialaccount/connections.html +++ b/trojstenid/users/templates/socialaccount/connections.html @@ -19,7 +19,7 @@

Externé účty

{% for base_account in form.accounts %} - {% with base_account.get_provider_account as account %} + {% with account=base_account.get_provider_account %}
-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/socialaccount/login.html b/trojstenid/users/templates/socialaccount/login.html index 357f5e4..deb4bda 100644 --- a/trojstenid/users/templates/socialaccount/login.html +++ b/trojstenid/users/templates/socialaccount/login.html @@ -18,4 +18,4 @@

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/socialaccount/login_cancelled.html b/trojstenid/users/templates/socialaccount/login_cancelled.html index 4b5c1bd..26a5288 100644 --- a/trojstenid/users/templates/socialaccount/login_cancelled.html +++ b/trojstenid/users/templates/socialaccount/login_cancelled.html @@ -12,4 +12,4 @@

Prihlásenie prostredníctvom externého účtu bolo prerušené. Ak sa jedná o chybu, pokračuj na prihlásenie.

-{% endblock %} +{% endblock content %} diff --git a/trojstenid/users/templates/socialaccount/partials/providers.html b/trojstenid/users/templates/socialaccount/partials/providers.html index 9f8d148..8d46334 100644 --- a/trojstenid/users/templates/socialaccount/partials/providers.html +++ b/trojstenid/users/templates/socialaccount/partials/providers.html @@ -25,7 +25,7 @@ Univerzita Komenského - +
{% csrf_token %} {% if redirect_field_value %} diff --git a/trojstenid/users/templatetags/forms.py b/trojstenid/users/templatetags/forms.py index e173b21..a1cb3c2 100644 --- a/trojstenid/users/templatetags/forms.py +++ b/trojstenid/users/templatetags/forms.py @@ -4,7 +4,7 @@ @register.inclusion_tag("forms/input.html") -def input(field): +def input(field): # noqa: A001 return {"field": field}