diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ac16dfef..e37b97b0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,6 +20,5 @@ // Use 'postCreateCommand' to run commands after the container is created. // Note: Useful for when they open it and want everything to just start - "postCreateCommand": "./.devcontainer/setup.sh", - "postStartCommand": "./.devcontainer/post_start.sh" + "postCreateCommand": "./.devcontainer/setup.sh" } diff --git a/.devcontainer/post_start.sh b/.devcontainer/post_start.sh deleted file mode 100755 index 3ac9d8af..00000000 --- a/.devcontainer/post_start.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -# Run the database in the background -docker compose up -d \ No newline at end of file diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index d6159c52..578d02cd 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -25,16 +25,5 @@ fi (cd server && POETRY_VIRTUALENVS_CREATE=false poetry install) (cd client && npm install) -# Run the database in the background -docker compose up -d - -# Wait for the database to start -# Get the container ID of the db service -DB_CONTAINER_ID=$(docker compose ps -q db) -echo "Waiting for the database to be ready..." -until [ "$(docker inspect -f '{{.State.Health.Status}}' "$DB_CONTAINER_ID")" == "healthy" ]; do - sleep 1 -done - # Nuke and migrate db (cd server && ./nuke.sh) diff --git a/.env.prod.example b/.env.prod.example index 54645cb7..f0e14ef3 100644 --- a/.env.prod.example +++ b/.env.prod.example @@ -8,12 +8,6 @@ APP_NAME=DjangoAPI API_SECRET_KEY= CHANGE THIS TO A RANDOM STRING API_ALLOWED_HOSTS=".localhost 127.0.0.1 [::1] .codersforcauses.org" -POSTGRES_HOST=db -POSTGRES_NAME=postgres -POSTGRES_USER=postgres -POSTGRES_PASSWORD=password -POSTGRES_PORT=5432 - DJANGO_SUPERUSER_PASSWORD= CHANGE THIS TO A RANDOM STRING DJANGO_SUPERUSER_EMAIL= CHANGE THIS TO A VALID EMAIL DJANGO_SUPERUSER_USERNAME= CHANGE THIS TO A VALID USERNAME diff --git a/README.md b/README.md index a21a8d7c..6b315d97 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Django + Nextjs Template: Standardised CFC Tech Stack --- -## Quick Start (Dev Container) - Recommended +## Quick Start (Dev Container) The easiest way to get started is using the VS Code Dev Container: @@ -37,90 +37,52 @@ The easiest way to get started is using the VS Code Dev Container: **Note**: Only follow these steps if you're NOT using the dev container. -### Prerequisites +### Installation Steps + +#### 1. Install Prerequisites -- **Node.js 18+** and **npm** - [Download here](https://nodejs.org/) +- **Node.js 20+** and **npm** - [Download here](https://nodejs.org/) - **Python 3.12+** - [Download here](https://python.org/) - **Poetry** (Python package manager) - [Installation guide](https://python-poetry.org/docs/#installation) -- **Docker Desktop** - [Download here](https://www.docker.com/products/docker-desktop/) - -### Installation Steps -#### 1. Clone the Repository +#### 2. Clone the Repository ```bash git clone cd ``` -#### 2. Install Prerequisites +#### 3. Set Up Environment Variables -**Poetry (Python package manager)** -```bash -# Official installer (all OSes) -curl -sSL https://install.python-poetry.org | python3 - - -# If that fails, use pip (all OSes) -pip install poetry -``` - -#### 3. Start the Database +The client and server are configured by `.env` files, local to your device and not tracked by git. +To set these up you can simply copy the `.env.example` files in each to a new `.env` file. -```bash -cd server && docker compose up -d -``` - -#### 4. Set Up Environment Variables - -Before proceeding, create your environment files by copying the examples: +Run the command below to do this automatically (system dependant). ```bash cp ./client/.env.example ./client/.env && cp ./server/.env.example ./server/.env ``` -**Backend (`.env` in `server/`)** -```env -APP_NAME=DjangoAPI -APP_ENV=DEVELOPMENT -API_SECRET_KEY=your-secret-key-here -API_ALLOWED_HOSTS=.localhost 127.0.0.1 [::1] - -POSTGRES_HOST=localhost -POSTGRES_NAME=your_db_name -POSTGRES_USER=your_username -POSTGRES_PASSWORD=your_password -POSTGRES_PORT=5432 - -DJANGO_SUPERUSER_PASSWORD=Password123 -DJANGO_SUPERUSER_EMAIL=admin@test.com -DJANGO_SUPERUSER_USERNAME=admin - -FRONTEND_URL=http://localhost:3000 -``` - -**Frontend (`.env` in `client/`)** -```env -NEXT_PUBLIC_BACKEND_URL=http://localhost:8000 -``` - -#### 5. Set Up the Backend (Django) +#### 4. Set Up the Backend (Django) ```bash cd server poetry install -poetry shell + +eval $(poetry env activate) #Bash/Zsh/Csh +Invoke-Expression (poetry env activate) #Powershell + python manage.py migrate python manage.py createsuperuser # optional python manage.py runserver ``` -#### 6. Set Up the Frontend (Next.js) +#### 5. Set Up the Frontend (Next.js) ```bash cd client npm install npm run dev ``` -#### 7. Verify Installation +#### 6. Verify Installation - Frontend: [http://localhost:3000](http://localhost:3000) -- Backend API: [http://localhost:8000](http://localhost:8000) - Admin panel: [http://localhost:8000/admin](http://localhost:8000/admin) --- diff --git a/client/eslint.config.mjs b/client/eslint.config.mjs index eb8bf51c..d1907354 100644 --- a/client/eslint.config.mjs +++ b/client/eslint.config.mjs @@ -1,38 +1,25 @@ -import { defineConfig } from "eslint/config"; +import { FlatCompat } from '@eslint/eslintrc' +import importPlugin from "eslint-plugin-import"; import simpleImportSort from "eslint-plugin-simple-import-sort"; -import _import from "eslint-plugin-import"; -import { fixupPluginRules } from "@eslint/compat"; import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all, + baseDirectory: import.meta.dirname, }); -export default defineConfig([ +const eslintConfig =[ + ...compat.config({ + extends: ["next/core-web-vitals", "next/typescript"] + }), { files: ["**/*.ts", "**/*.tsx"], - extends: compat.extends( - "plugin:@next/next/recommended", - "plugin:@tanstack/eslint-plugin-query/recommended", - ), - plugins: { - "simple-import-sort": simpleImportSort, - import: fixupPluginRules(_import), + 'simple-import-sort': simpleImportSort, + import: importPlugin, }, - languageOptions: { parser: tsParser, }, - rules: { "simple-import-sort/imports": "warn", "simple-import-sort/exports": "warn", @@ -41,4 +28,9 @@ export default defineConfig([ "import/no-duplicates": "warn", }, }, -]); + { + ignores: ["node_modules/**", ".next/**", "next-env.d.ts"] + } +]; + +export default eslintConfig \ No newline at end of file diff --git a/client/next.config.mjs b/client/next.config.mjs index e9441a65..c5b60fed 100644 --- a/client/next.config.mjs +++ b/client/next.config.mjs @@ -1,23 +1,24 @@ -import os from "node:os"; +// import os from "node:os"; +// import isInsideContainer from "is-inside-container"; -import isInsideContainer from "is-inside-container"; - -const isWindowsDevContainer = () => - os.release().toLowerCase().includes("microsoft") && isInsideContainer(); +// const isWindowsDevContainer = () => +// os.release().toLowerCase().includes("microsoft") && isInsideContainer(); /** @type {import('next').NextConfig} */ -const nextConfig = { + +const config = { reactStrictMode: true, - // dumb fix for windows docker - webpack: isWindowsDevContainer() - ? (config) => { - config.watchOptions = { - poll: 1000, - aggregateTimeout: 300, - }; - return config; - } - : undefined, + turbopack: { + root: import.meta.dirname, + }, + outputFileTracingRoot: import.meta.dirname, + // Turns on file change polling for the Windows Dev Container + // Doesn't work currently for turbopack, so file changes will not automatically update the client. + // watchOptions: isWindowsDevContainer() + // ? { + // pollIntervalMs: 1000 + // } + // : undefined, }; -export default nextConfig; +export default config; diff --git a/client/package-lock.json b/client/package-lock.json index f9648a04..b8a43bb1 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -43,6 +43,9 @@ "prettier-plugin-tailwindcss": "^0.6.12", "tailwindcss": "^3.4.17", "typescript": "^5.8.3" + }, + "engines": { + "node": ">=20.0.0" } }, "node_modules/@alloc/quick-lru": { @@ -2192,9 +2195,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001723", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001723.tgz", - "integrity": "sha512-1R/elMjtehrFejxwmexeXAtae5UO9iSyFn6G/I806CYC/BLyyBk1EPhrKBkWhy6wM6Xnm47dSJQec+tLJ39WHw==", + "version": "1.0.30001756", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001756.tgz", + "integrity": "sha512-4HnCNKbMLkLdhJz3TToeVWHSnfJvPaq6vu/eRP0Ahub/07n484XHhBF5AJoSGHdVrS8tKFauUQz8Bp9P7LVx7A==", "funding": [ { "type": "opencollective", diff --git a/client/package.json b/client/package.json index ce70203f..e38c24c5 100644 --- a/client/package.json +++ b/client/package.json @@ -2,6 +2,9 @@ "name": "client", "version": "0.1.0", "private": true, + "engines":{ + "node": ">=20.0.0" + }, "scripts": { "dev": "next dev --turbopack", "build": "next build", diff --git a/client/src/lib/utils.ts b/client/src/lib/utils.ts index cfe8e64b..365058ce 100644 --- a/client/src/lib/utils.ts +++ b/client/src/lib/utils.ts @@ -1,4 +1,3 @@ -import axios from "axios"; import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; diff --git a/client/tailwind.config.ts b/client/tailwind.config.ts index a47f61be..1fb1ab1f 100644 --- a/client/tailwind.config.ts +++ b/client/tailwind.config.ts @@ -1,5 +1,6 @@ import type { Config } from "tailwindcss"; import { fontFamily } from "tailwindcss/defaultTheme"; +import animate from "tailwindcss-animate"; const config = { darkMode: ["class"], @@ -78,7 +79,7 @@ const config = { }, }, }, - plugins: [require("tailwindcss-animate")], + plugins: [animate], } satisfies Config; export default config; diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 43047cd2..c8236ab6 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,16 +1,4 @@ services: - db: - image: postgres:16.4 - restart: unless-stopped - volumes: - - ./data/db:/var/lib/postgresql/data - env_file: ./.env.prod - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 3s - timeout: 3s - retries: 5 - server: image: ghcr.io/codersforcauses/transplant-prod-server:latest container_name: transplant_server @@ -24,8 +12,6 @@ services: - ./opt/static_files:/opt/static_files environment: - DJANGO_SETTINGS_MODULE=api.settings - depends_on: - - db client: image: ghcr.io/codersforcauses/transplant-prod-client:latest diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 30caf059..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,14 +0,0 @@ -services: - db: - image: postgres:16.4 - restart: unless-stopped - volumes: - - ./data/db:/var/lib/postgresql/data - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 3s - timeout: 3s - retries: 5 - env_file: ./server/.env - ports: - - 5432:5432 diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 3e886bde..cdb8a3bb 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.12-slim -RUN apt-get update && apt-get install --yes --no-install-recommends postgresql-client g++ libssl-dev && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install --yes --no-install-recommends g++ libssl-dev && rm -rf /var/lib/apt/lists/* RUN pip install --upgrade pip && pip install poetry diff --git a/docker/server/entrypoint.sh b/docker/server/entrypoint.sh index 35e9ecdd..ec1e170c 100644 --- a/docker/server/entrypoint.sh +++ b/docker/server/entrypoint.sh @@ -1,16 +1,5 @@ #!/bin/bash -# Wait until Database is available before continuing -printf "\n" && echo "Checking Database is up" -# using psql -while ! pg_isready -q -h $POSTGRES_HOST -p $POSTGRES_PORT -U $POSTGRES_USER -do - echo "$(date) - waiting for database to start" - sleep 1 -done - ->&2 echo "Postgres is up - continuing" - echo "Applying database migrations" python manage.py migrate --noinput diff --git a/server/.env.example b/server/.env.example index 88efad2d..7c432824 100644 --- a/server/.env.example +++ b/server/.env.example @@ -4,12 +4,6 @@ APP_ENV=DEVELOPMENT API_SECRET_KEY="supersecretkey" API_ALLOWED_HOSTS=".localhost 127.0.0.1 [::1]" -POSTGRES_HOST=localhost -POSTGRES_NAME=postgres -POSTGRES_USER=postgres -POSTGRES_PASSWORD=password -POSTGRES_PORT=5432 - DJANGO_SUPERUSER_PASSWORD=Password123 DJANGO_SUPERUSER_EMAIL=admin@test.com DJANGO_SUPERUSER_USERNAME=admin diff --git a/server/README.md b/server/README.md index 5ac8fc78..88f56043 100644 --- a/server/README.md +++ b/server/README.md @@ -2,7 +2,7 @@ A template Django server. -1. Install dependencies: `poetry install` if not in dev container +1. Install dependencies: `poetry install` and activate the environment if not in dev container 2. Run: `python manage.py runserver` or `.\dev.sh` Note this file needs to be here otherwise poetry won't recognise this as a valid project. diff --git a/server/api/settings.py b/server/api/settings.py index 0bf673ed..2a266193 100644 --- a/server/api/settings.py +++ b/server/api/settings.py @@ -97,12 +97,8 @@ DATABASES = { "default": { - "ENGINE": "django.db.backends.postgresql", - "NAME": os.environ.get("POSTGRES_NAME") or "postgres", - "USER": os.environ.get("POSTGRES_USER") or "postgres", - "PASSWORD": os.environ.get("POSTGRES_PASSWORD") or "password", - "HOST": os.environ.get("POSTGRES_HOST") or "host.docker.internal", - "PORT": os.environ.get("POSTGRES_PORT") or 5432, + "ENGINE": "django.db.backends.sqlite3", + "NAME": BASE_DIR / "db.sqlite3", } } diff --git a/server/dev.sh b/server/dev.sh deleted file mode 100755 index b6ac9b43..00000000 --- a/server/dev.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -python manage.py runserver \ No newline at end of file diff --git a/server/poetry.lock b/server/poetry.lock index 52bf0d20..ceecf9f4 100644 --- a/server/poetry.lock +++ b/server/poetry.lock @@ -279,111 +279,6 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] -[[package]] -name = "psycopg" -version = "3.2.1" -description = "PostgreSQL database adapter for Python" -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "psycopg-3.2.1-py3-none-any.whl", hash = "sha256:ece385fb413a37db332f97c49208b36cf030ff02b199d7635ed2fbd378724175"}, - {file = "psycopg-3.2.1.tar.gz", hash = "sha256:dc8da6dc8729dacacda3cc2f17d2c9397a70a66cf0d2b69c91065d60d5f00cb7"}, -] - -[package.dependencies] -psycopg-binary = {version = "3.2.1", optional = true, markers = "implementation_name != \"pypy\" and extra == \"binary\""} -psycopg-pool = {version = "*", optional = true, markers = "extra == \"pool\""} -typing-extensions = ">=4.4" -tzdata = {version = "*", markers = "sys_platform == \"win32\""} - -[package.extras] -binary = ["psycopg-binary (==3.2.1) ; implementation_name != \"pypy\""] -c = ["psycopg-c (==3.2.1) ; implementation_name != \"pypy\""] -dev = ["ast-comments (>=1.1.2)", "black (>=24.1.0)", "codespell (>=2.2)", "dnspython (>=2.1)", "flake8 (>=4.0)", "mypy (>=1.6)", "types-setuptools (>=57.4)", "wheel (>=0.37)"] -docs = ["Sphinx (>=5.0)", "furo (==2022.6.21)", "sphinx-autobuild (>=2021.3.14)", "sphinx-autodoc-typehints (>=1.12)"] -pool = ["psycopg-pool"] -test = ["anyio (>=4.0)", "mypy (>=1.6)", "pproxy (>=2.7)", "pytest (>=6.2.5)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.5)"] - -[[package]] -name = "psycopg-binary" -version = "3.2.1" -description = "PostgreSQL database adapter for Python -- C optimisation distribution" -optional = false -python-versions = ">=3.8" -groups = ["main"] -markers = "implementation_name != \"pypy\"" -files = [ - {file = "psycopg_binary-3.2.1-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:cad2de17804c4cfee8640ae2b279d616bb9e4734ac3c17c13db5e40982bd710d"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:592b27d6c46a40f9eeaaeea7c1fef6f3c60b02c634365eb649b2d880669f149f"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9a997efbaadb5e1a294fb5760e2f5643d7b8e4e3fe6cb6f09e6d605fd28e0291"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c1d2b6438fb83376f43ebb798bf0ad5e57bc56c03c9c29c85bc15405c8c0ac5a"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b1f087bd84bdcac78bf9f024ebdbfacd07fc0a23ec8191448a50679e2ac4a19e"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:415c3b72ea32119163255c6504085f374e47ae7345f14bc3f0ef1f6e0976a879"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f092114f10f81fb6bae544a0ec027eb720e2d9c74a4fcdaa9dd3899873136935"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:06a7aae34edfe179ddc04da005e083ff6c6b0020000399a2cbf0a7121a8a22ea"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:0b018631e5c80ce9bc210b71ea885932f9cca6db131e4df505653d7e3873a938"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f8a509aeaac364fa965454e80cd110fe6d48ba2c80f56c9b8563423f0b5c3cfd"}, - {file = "psycopg_binary-3.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:413977d18412ff83486eeb5875eb00b185a9391c57febac45b8993bf9c0ff489"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:62b1b7b07e00ee490afb39c0a47d8282a9c2822c7cfed9553a04b0058adf7e7f"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:f8afb07114ea9b924a4a0305ceb15354ccf0ef3c0e14d54b8dbeb03e50182dd7"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40bb515d042f6a345714ec0403df68ccf13f73b05e567837d80c886c7c9d3805"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6418712ba63cebb0c88c050b3997185b0ef54173b36568522d5634ac06153040"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:101472468d59c74bb8565fab603e032803fd533d16be4b2d13da1bab8deb32a3"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa3931f308ab4a479d0ee22dc04bea867a6365cac0172e5ddcba359da043854b"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:dc314a47d44fe1a8069b075a64abffad347a3a1d8652fed1bab5d3baea37acb2"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:cc304a46be1e291031148d9d95c12451ffe783ff0cc72f18e2cc7ec43cdb8c68"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6f9e13600647087df5928875559f0eb8f496f53e6278b7da9511b4b3d0aff960"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b140182830c76c74d17eba27df3755a46442ce8d4fb299e7f1cf2f74a87c877b"}, - {file = "psycopg_binary-3.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:3c838806eeb99af39f934b7999e35f947a8e577997cc892c12b5053a97a9057f"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:7066d3dca196ed0dc6172f9777b2d62e4f138705886be656cccff2d555234d60"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:28ada5f610468c57d8a4a055a8ea915d0085a43d794266c4f3b9d02f4288f4db"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e8213bf50af073b1aa8dc3cff123bfeedac86332a16c1b7274910bc88a847c7"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74d623261655a169bc84a9669890975c229f2fa6e19a7f2d10a77675dcf1a707"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:42781ba94e8842ee98bca5a7d0c44cc9d067500fedca2d6a90fa3609b6d16b42"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33e6669091d09f8ba36e10ce678a6d9916e110446236a9b92346464a3565635e"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b09e8a576a2ac69d695032ee76f31e03b30781828b5dd6d18c6a009e5a3d1c35"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:8f28ff0cb9f1defdc4a6f8c958bf6787274247e7dfeca811f6e2f56602695fb1"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4c84fcac8a3a3479ac14673095cc4e1fdba2935499f72c436785ac679bec0d1a"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:950fd666ec9e9fe6a8eeb2b5a8f17301790e518953730ad44d715b59ffdbc67f"}, - {file = "psycopg_binary-3.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:334046a937bb086c36e2c6889fe327f9f29bfc085d678f70fac0b0618949f674"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:1d6833f607f3fc7b22226a9e121235d3b84c0eda1d3caab174673ef698f63788"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d353e028b8f848b9784450fc2abf149d53a738d451eab3ee4c85703438128b9"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f34e369891f77d0738e5d25727c307d06d5344948771e5379ea29c76c6d84555"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0ab58213cc976a1666f66bc1cb2e602315cd753b7981a8e17237ac2a185bd4a1"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0104a72a17aa84b3b7dcab6c84826c595355bf54bb6ea6d284dcb06d99c6801"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:059cbd4e6da2337e17707178fe49464ed01de867dc86c677b30751755ec1dc51"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:73f9c9b984be9c322b5ec1515b12df1ee5896029f5e72d46160eb6517438659c"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:af0469c00f24c4bec18c3d2ede124bf62688d88d1b8a5f3c3edc2f61046fe0d7"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:463d55345f73ff391df8177a185ad57b552915ad33f5cc2b31b930500c068b22"}, - {file = "psycopg_binary-3.2.1-cp38-cp38-win_amd64.whl", hash = "sha256:302b86f92c0d76e99fe1b5c22c492ae519ce8b98b88d37ef74fda4c9e24c6b46"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:0879b5d76b7d48678d31278242aaf951bc2d69ca4e4d7cef117e4bbf7bfefda9"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f99e59f8a5f4dcd9cbdec445f3d8ac950a492fc0e211032384d6992ed3c17eb7"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:84837e99353d16c6980603b362d0f03302d4b06c71672a6651f38df8a482923d"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ce965caf618061817f66c0906f0452aef966c293ae0933d4fa5a16ea6eaf5bb"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78c2007caf3c90f08685c5378e3ceb142bafd5636be7495f7d86ec8a977eaeef"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7a84b5eb194a258116154b2a4ff2962ea60ea52de089508db23a51d3d6b1c7d1"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:4a42b8f9ab39affcd5249b45cac763ac3cf12df962b67e23fd15a2ee2932afe5"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:788ffc43d7517c13e624c83e0e553b7b8823c9655e18296566d36a829bfb373f"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:21927f41c4d722ae8eb30d62a6ce732c398eac230509af5ba1749a337f8a63e2"}, - {file = "psycopg_binary-3.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:921f0c7f39590763d64a619de84d1b142587acc70fd11cbb5ba8fa39786f3073"}, -] - -[[package]] -name = "psycopg-pool" -version = "3.2.2" -description = "Connection Pool for Psycopg" -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "psycopg_pool-3.2.2-py3-none-any.whl", hash = "sha256:273081d0fbfaced4f35e69200c89cb8fbddfe277c38cc86c235b90a2ec2c8153"}, - {file = "psycopg_pool-3.2.2.tar.gz", hash = "sha256:9e22c370045f6d7f2666a5ad1b0caf345f9f1912195b0b25d0d3bcc4f3a7389c"}, -] - -[package.dependencies] -typing-extensions = ">=4.4" - [[package]] name = "pycodestyle" version = "2.11.1" @@ -487,18 +382,6 @@ files = [ dev = ["build", "hatch"] doc = ["sphinx"] -[[package]] -name = "typing-extensions" -version = "4.12.2" -description = "Backported and Experimental Type Hints for Python 3.8+" -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, -] - [[package]] name = "tzdata" version = "2024.1" @@ -595,4 +478,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "^3.12" -content-hash = "65bc4afc0977914acaa615ac9856122bc6250c14b2671f01f8a14e45bb694a87" +content-hash = "192f659fc30a5b1276a4219e8d44c9c7150839dd2a2ab3031961476f15bb8d75" diff --git a/server/pyproject.toml b/server/pyproject.toml index 4a88bdf5..85ba5371 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -11,7 +11,6 @@ python = "^3.12" Django = "^5.1" djangorestframework = "^3.15.1" django-cors-headers = "^4.3.1" -psycopg = {extras = ["binary", "pool"], version = "^3.2.1"} freezegun = "^1.5.1" gunicorn = "^23.0.0" python-dotenv = "^1.0.1"