From b28bdba05ed0f9121e9dbdce64e621ef00c1506e Mon Sep 17 00:00:00 2001 From: Jimmy Juarez Date: Fri, 17 May 2024 14:25:48 -0700 Subject: [PATCH] Remove backend folder from repo. --- backend/.gitignore | 3 - backend/config/__init__.py | 0 backend/config/asgi.py | 16 -- backend/config/settings.py | 163 ----------- backend/config/urls.py | 9 - backend/config/wsgi.py | 16 -- backend/entrypoint.sh | 11 - backend/frontend/__init__.py | 0 backend/frontend/apps.py | 6 - backend/frontend/static/frontend/.gitkeep | 0 backend/frontend/templates/frontend/.gitkeep | 0 backend/frontend/urls.py | 16 -- backend/frontend/views.py | 11 - backend/manage.py | 24 -- backend/poetry.lock | 272 ------------------ backend/poetry.toml | 1 - backend/pyproject.toml | 25 -- backend/server/__init__.py | 0 backend/server/admin.py | 0 backend/server/apps.py | 6 - backend/server/fixtures/test_data.yaml | 221 -------------- backend/server/migrations/0001_initial.py | 222 -------------- backend/server/migrations/0002_test.py | 29 -- ...nityxmeetings_opportunityxtech_and_more.py | 175 ----------- backend/server/migrations/0004_post.py | 33 --- backend/server/migrations/__init__.py | 0 backend/server/models.py | 71 ----- backend/server/serializers.py | 29 -- backend/server/templates/swagger-ui.html | 32 --- backend/server/tests.py | 75 ----- backend/server/urls.py | 30 -- backend/server/views.py | 43 --- backend/setup.cfg | 9 - dev/django.dockerfile | 2 + docker-compose.yml | 36 +-- 35 files changed, 3 insertions(+), 1583 deletions(-) delete mode 100644 backend/.gitignore delete mode 100644 backend/config/__init__.py delete mode 100644 backend/config/asgi.py delete mode 100644 backend/config/settings.py delete mode 100644 backend/config/urls.py delete mode 100644 backend/config/wsgi.py delete mode 100755 backend/entrypoint.sh delete mode 100644 backend/frontend/__init__.py delete mode 100644 backend/frontend/apps.py delete mode 100644 backend/frontend/static/frontend/.gitkeep delete mode 100644 backend/frontend/templates/frontend/.gitkeep delete mode 100644 backend/frontend/urls.py delete mode 100644 backend/frontend/views.py delete mode 100755 backend/manage.py delete mode 100644 backend/poetry.lock delete mode 100644 backend/poetry.toml delete mode 100644 backend/pyproject.toml delete mode 100644 backend/server/__init__.py delete mode 100644 backend/server/admin.py delete mode 100644 backend/server/apps.py delete mode 100644 backend/server/fixtures/test_data.yaml delete mode 100644 backend/server/migrations/0001_initial.py delete mode 100644 backend/server/migrations/0002_test.py delete mode 100644 backend/server/migrations/0003_opportunityxmeetings_opportunityxtech_and_more.py delete mode 100644 backend/server/migrations/0004_post.py delete mode 100644 backend/server/migrations/__init__.py delete mode 100644 backend/server/models.py delete mode 100644 backend/server/serializers.py delete mode 100644 backend/server/templates/swagger-ui.html delete mode 100644 backend/server/tests.py delete mode 100644 backend/server/urls.py delete mode 100644 backend/server/views.py delete mode 100644 backend/setup.cfg diff --git a/backend/.gitignore b/backend/.gitignore deleted file mode 100644 index 2b1ae71e..00000000 --- a/backend/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -frontend/static/frontend -frontend/templates/frontend -.idea/ \ No newline at end of file diff --git a/backend/config/__init__.py b/backend/config/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/config/asgi.py b/backend/config/asgi.py deleted file mode 100644 index c31b0ec7..00000000 --- a/backend/config/asgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -ASGI config for config project. - -It exposes the ASGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ -""" - -import os - -from django.core.asgi import get_asgi_application - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") - -application = get_asgi_application() diff --git a/backend/config/settings.py b/backend/config/settings.py deleted file mode 100644 index 3ac53e31..00000000 --- a/backend/config/settings.py +++ /dev/null @@ -1,163 +0,0 @@ -""" -Django settings for config project. - -Generated by 'django-admin startproject' using Django 3.2.7. - -For more information on this file, see -https://docs.djangoproject.com/en/3.2/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/3.2/ref/settings/ -""" - -import os -from pathlib import Path - -# Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve().parent.parent - - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = os.environ.get( - "SECRET_KEY", "django-insecure-33vbl)@ay-yc6)h5jwqsphea(2#iq=1^h$9un7b-bh5h^gjvpv" -) - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = os.environ.get("DEBUG", "True") != "False" - -ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "localhost").split(" ") -if "ECS_ALLOWED_HOST" in os.environ: - ALLOWED_HOSTS.append(os.environ.get("ECS_ALLOWED_HOST")) - -# Application definition - -INSTALLED_APPS = [ - "rest_framework", - "django.contrib.admin", - "django.contrib.auth", - "django.contrib.contenttypes", - "django.contrib.sessions", - "django.contrib.messages", - "django.contrib.staticfiles", - "server", - "frontend", -] - - -COMMON_MIDDLEWARE = [ - "django.middleware.security.SecurityMiddleware", - "django.contrib.sessions.middleware.SessionMiddleware", - "django.middleware.common.CommonMiddleware", - "django.middleware.csrf.CsrfViewMiddleware", - "django.contrib.auth.middleware.AuthenticationMiddleware", - "django.contrib.messages.middleware.MessageMiddleware", - "django.middleware.clickjacking.XFrameOptionsMiddleware", -] - -DEV_MIDDLEWARE = [] - -STAGE_MIDDLEWARE = [ - "whitenoise.middleware.WhiteNoiseMiddleware", -] - -environ = os.environ.get("ENVIRON", "dev") - -if environ == "dev": - MIDDLEWARE = COMMON_MIDDLEWARE + DEV_MIDDLEWARE -elif environ == "stage": - MIDDLEWARE = COMMON_MIDDLEWARE + STAGE_MIDDLEWARE - -ROOT_URLCONF = "config.urls" - -TEMPLATES = [ - { - "BACKEND": "django.template.backends.django.DjangoTemplates", - "DIRS": [], - "APP_DIRS": True, - "OPTIONS": { - "context_processors": [ - "django.template.context_processors.debug", - "django.template.context_processors.request", - "django.contrib.auth.context_processors.auth", - "django.contrib.messages.context_processors.messages", - ], - }, - }, -] - -WSGI_APPLICATION = "config.wsgi.application" - -VERSION = '1.0.0' - -# Database -# https://docs.djangoproject.com/en/3.2/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql', - 'NAME': os.environ.get('POSTGRES_NAME'), - 'USER': os.environ.get('POSTGRES_USER'), - 'PASSWORD': os.environ.get('POSTGRES_PASSWORD'), - 'HOST': 'pgdb', - 'PORT': 5432, #default port you don't need to mention in docker-compose - } -} - - - - -# Password validation -# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", # noqa: E501 # pylint: disable=C0301 - }, - { - "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", - }, - { - "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", - }, - { - "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", - }, -] - - -# Internationalization -# https://docs.djangoproject.com/en/3.2/topics/i18n/ - -LANGUAGE_CODE = "en-us" - -TIME_ZONE = "UTC" - -USE_I18N = True - -USE_L10N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/3.2/howto/static-files/ - -STATIC_URL = "/static/" -STATIC_ROOT = BASE_DIR / "staticfiles" - -# Default primary key field type -# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field - -DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" - -SECURE_SSL_REDIRECT = os.environ.get("SECURE_SSL_REDIRECT", "False") == "True" -SESSION_COOKIE_SECURE = os.environ.get("SESSION_COOKIE_SECURE", "False") == "True" -CSRF_COOKIE_SECURE = os.environ.get("CSRF_COOKIE_SECURE", "False") == "True" -SECURE_HSTS_SECONDS = int(os.environ.get("SECURE_HSTS_SECONDS", "0")) -env = os.environ.get("SECURE_PROXY_SSL_HEADER", None) -SECURE_PROXY_SSL_HEADER = ( - tuple(env).split(" ") if env else None # pylint: disable=E1101 -) diff --git a/backend/config/urls.py b/backend/config/urls.py deleted file mode 100644 index 7377b69e..00000000 --- a/backend/config/urls.py +++ /dev/null @@ -1,9 +0,0 @@ -from django.contrib import admin -from django.urls import include, path - -urlpatterns = [ - path("", include("frontend.urls")), - path("api/", include("server.urls")), -] - -handler404 = "frontend.views.custom_404" diff --git a/backend/config/wsgi.py b/backend/config/wsgi.py deleted file mode 100644 index 3d6fa1b8..00000000 --- a/backend/config/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for config project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") - -application = get_wsgi_application() diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh deleted file mode 100755 index 8c3a00b9..00000000 --- a/backend/entrypoint.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -if [ "$TARGET" = "ECS" ]; then - ECS_ALLOWED_HOST=$(curl -s "${ECS_CONTAINER_METADATA_URI}" | jq -r .Networks[0].IPv4Addresses[0]) - export ECS_ALLOWED_HOST -fi - -python manage.py collectstatic --link && \ - python manage.py makemigrations && \ - python manage.py migrate && \ - python manage.py generateschema --file openapi-schema.yml && \ - gunicorn config.wsgi --bind 0.0.0.0:8000 diff --git a/backend/frontend/__init__.py b/backend/frontend/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/frontend/apps.py b/backend/frontend/apps.py deleted file mode 100644 index c626efa1..00000000 --- a/backend/frontend/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class FrontendConfig(AppConfig): - default_auto_field = "django.db.models.BigAutoField" - name = "frontend" diff --git a/backend/frontend/static/frontend/.gitkeep b/backend/frontend/static/frontend/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/frontend/templates/frontend/.gitkeep b/backend/frontend/templates/frontend/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/frontend/urls.py b/backend/frontend/urls.py deleted file mode 100644 index e156e2e0..00000000 --- a/backend/frontend/urls.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.urls import path - -from . import views - -url_paths = [ - "", - "credits", - "demo", - "demo-tailwind", - "qualifier/", - "login", - "signup", - "privacypolicy", -] - -urlpatterns = [path(url_path, views.index) for url_path in url_paths] diff --git a/backend/frontend/views.py b/backend/frontend/views.py deleted file mode 100644 index cc4005ef..00000000 --- a/backend/frontend/views.py +++ /dev/null @@ -1,11 +0,0 @@ -from django.shortcuts import render - -# Create your views here. - - -def index(request, **args): - return render(request, "frontend/index.html") - - -def custom_404(request, exception): - return render(request, "frontend/index.html", status=404) diff --git a/backend/manage.py b/backend/manage.py deleted file mode 100755 index cc0d110b..00000000 --- a/backend/manage.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -"""Django's command-line utility for administrative tasks.""" -import os -import sys - - -def main(): - """Run administrative tasks.""" - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") - try: - from django.core.management import ( # pylint: disable=C0415 - execute_from_command_line, - ) - except ImportError as exc: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) from exc - execute_from_command_line(sys.argv) - - -if __name__ == "__main__": - main() diff --git a/backend/poetry.lock b/backend/poetry.lock deleted file mode 100644 index 85a26960..00000000 --- a/backend/poetry.lock +++ /dev/null @@ -1,272 +0,0 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. - -[[package]] -name = "asgiref" -version = "3.7.2" -description = "ASGI specs, helper code, and adapters" -optional = false -python-versions = ">=3.7" -files = [ - {file = "asgiref-3.7.2-py3-none-any.whl", hash = "sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e"}, - {file = "asgiref-3.7.2.tar.gz", hash = "sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed"}, -] - -[package.extras] -tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] - -[[package]] -name = "django" -version = "4.2.4" -description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." -optional = false -python-versions = ">=3.8" -files = [ - {file = "Django-4.2.4-py3-none-any.whl", hash = "sha256:860ae6a138a238fc4f22c99b52f3ead982bb4b1aad8c0122bcd8c8a3a02e409d"}, - {file = "Django-4.2.4.tar.gz", hash = "sha256:7e4225ec065e0f354ccf7349a22d209de09cc1c074832be9eb84c51c1799c432"}, -] - -[package.dependencies] -asgiref = ">=3.6.0,<4" -sqlparse = ">=0.3.1" -tzdata = {version = "*", markers = "sys_platform == \"win32\""} - -[package.extras] -argon2 = ["argon2-cffi (>=19.1.0)"] -bcrypt = ["bcrypt"] - -[[package]] -name = "djangorestframework" -version = "3.14.0" -description = "Web APIs for Django, made easy." -optional = false -python-versions = ">=3.6" -files = [ - {file = "djangorestframework-3.14.0-py3-none-any.whl", hash = "sha256:eb63f58c9f218e1a7d064d17a70751f528ed4e1d35547fdade9aaf4cd103fd08"}, - {file = "djangorestframework-3.14.0.tar.gz", hash = "sha256:579a333e6256b09489cbe0a067e66abe55c6595d8926be6b99423786334350c8"}, -] - -[package.dependencies] -django = ">=3.0" -pytz = "*" - -[[package]] -name = "gunicorn" -version = "20.1.0" -description = "WSGI HTTP Server for UNIX" -optional = false -python-versions = ">=3.5" -files = [ - {file = "gunicorn-20.1.0-py3-none-any.whl", hash = "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e"}, - {file = "gunicorn-20.1.0.tar.gz", hash = "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"}, -] - -[package.dependencies] -setuptools = ">=3.0" - -[package.extras] -eventlet = ["eventlet (>=0.24.1)"] -gevent = ["gevent (>=1.4.0)"] -setproctitle = ["setproctitle"] -tornado = ["tornado (>=0.2)"] - -[[package]] -name = "psycopg2-binary" -version = "2.9.7" -description = "psycopg2 - Python-PostgreSQL Database Adapter" -optional = false -python-versions = ">=3.6" -files = [ - {file = "psycopg2-binary-2.9.7.tar.gz", hash = "sha256:1b918f64a51ffe19cd2e230b3240ba481330ce1d4b7875ae67305bd1d37b041c"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ea5f8ee87f1eddc818fc04649d952c526db4426d26bab16efbe5a0c52b27d6ab"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2993ccb2b7e80844d534e55e0f12534c2871952f78e0da33c35e648bf002bbff"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dbbc3c5d15ed76b0d9db7753c0db40899136ecfe97d50cbde918f630c5eb857a"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:692df8763b71d42eb8343f54091368f6f6c9cfc56dc391858cdb3c3ef1e3e584"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9dcfd5d37e027ec393a303cc0a216be564b96c80ba532f3d1e0d2b5e5e4b1e6e"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17cc17a70dfb295a240db7f65b6d8153c3d81efb145d76da1e4a096e9c5c0e63"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e5666632ba2b0d9757b38fc17337d84bdf932d38563c5234f5f8c54fd01349c9"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7db7b9b701974c96a88997d458b38ccb110eba8f805d4b4f74944aac48639b42"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c82986635a16fb1fa15cd5436035c88bc65c3d5ced1cfaac7f357ee9e9deddd4"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4fe13712357d802080cfccbf8c6266a3121dc0e27e2144819029095ccf708372"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-win32.whl", hash = "sha256:122641b7fab18ef76b18860dd0c772290566b6fb30cc08e923ad73d17461dc63"}, - {file = "psycopg2_binary-2.9.7-cp310-cp310-win_amd64.whl", hash = "sha256:f8651cf1f144f9ee0fa7d1a1df61a9184ab72962531ca99f077bbdcba3947c58"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4ecc15666f16f97709106d87284c136cdc82647e1c3f8392a672616aed3c7151"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3fbb1184c7e9d28d67671992970718c05af5f77fc88e26fd7136613c4ece1f89"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a7968fd20bd550431837656872c19575b687f3f6f98120046228e451e4064df"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:094af2e77a1976efd4956a031028774b827029729725e136514aae3cdf49b87b"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:26484e913d472ecb6b45937ea55ce29c57c662066d222fb0fbdc1fab457f18c5"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f309b77a7c716e6ed9891b9b42953c3ff7d533dc548c1e33fddc73d2f5e21f9"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6d92e139ca388ccfe8c04aacc163756e55ba4c623c6ba13d5d1595ed97523e4b"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:2df562bb2e4e00ee064779902d721223cfa9f8f58e7e52318c97d139cf7f012d"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:4eec5d36dbcfc076caab61a2114c12094c0b7027d57e9e4387b634e8ab36fd44"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1011eeb0c51e5b9ea1016f0f45fa23aca63966a4c0afcf0340ccabe85a9f65bd"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-win32.whl", hash = "sha256:ded8e15f7550db9e75c60b3d9fcbc7737fea258a0f10032cdb7edc26c2a671fd"}, - {file = "psycopg2_binary-2.9.7-cp311-cp311-win_amd64.whl", hash = "sha256:8a136c8aaf6615653450817a7abe0fc01e4ea720ae41dfb2823eccae4b9062a3"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2dec5a75a3a5d42b120e88e6ed3e3b37b46459202bb8e36cd67591b6e5feebc1"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc10da7e7df3380426521e8c1ed975d22df678639da2ed0ec3244c3dc2ab54c8"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee919b676da28f78f91b464fb3e12238bd7474483352a59c8a16c39dfc59f0c5"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb1c0e682138f9067a58fc3c9a9bf1c83d8e08cfbee380d858e63196466d5c86"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00d8db270afb76f48a499f7bb8fa70297e66da67288471ca873db88382850bf4"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:9b0c2b466b2f4d89ccc33784c4ebb1627989bd84a39b79092e560e937a11d4ac"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:51d1b42d44f4ffb93188f9b39e6d1c82aa758fdb8d9de65e1ddfe7a7d250d7ad"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:11abdbfc6f7f7dea4a524b5f4117369b0d757725798f1593796be6ece20266cb"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:f02f4a72cc3ab2565c6d9720f0343cb840fb2dc01a2e9ecb8bc58ccf95dc5c06"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-win32.whl", hash = "sha256:81d5dd2dd9ab78d31a451e357315f201d976c131ca7d43870a0e8063b6b7a1ec"}, - {file = "psycopg2_binary-2.9.7-cp37-cp37m-win_amd64.whl", hash = "sha256:62cb6de84d7767164a87ca97e22e5e0a134856ebcb08f21b621c6125baf61f16"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:59f7e9109a59dfa31efa022e94a244736ae401526682de504e87bd11ce870c22"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:95a7a747bdc3b010bb6a980f053233e7610276d55f3ca506afff4ad7749ab58a"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c721ee464e45ecf609ff8c0a555018764974114f671815a0a7152aedb9f3343"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4f37bbc6588d402980ffbd1f3338c871368fb4b1cfa091debe13c68bb3852b3"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac83ab05e25354dad798401babaa6daa9577462136ba215694865394840e31f8"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:024eaeb2a08c9a65cd5f94b31ace1ee3bb3f978cd4d079406aef85169ba01f08"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:1c31c2606ac500dbd26381145684d87730a2fac9a62ebcfbaa2b119f8d6c19f4"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:42a62ef0e5abb55bf6ffb050eb2b0fcd767261fa3faf943a4267539168807522"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:7952807f95c8eba6a8ccb14e00bf170bb700cafcec3924d565235dffc7dc4ae8"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e02bc4f2966475a7393bd0f098e1165d470d3fa816264054359ed4f10f6914ea"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-win32.whl", hash = "sha256:fdca0511458d26cf39b827a663d7d87db6f32b93efc22442a742035728603d5f"}, - {file = "psycopg2_binary-2.9.7-cp38-cp38-win_amd64.whl", hash = "sha256:d0b16e5bb0ab78583f0ed7ab16378a0f8a89a27256bb5560402749dbe8a164d7"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6822c9c63308d650db201ba22fe6648bd6786ca6d14fdaf273b17e15608d0852"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8f94cb12150d57ea433e3e02aabd072205648e86f1d5a0a692d60242f7809b15"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5ee89587696d808c9a00876065d725d4ae606f5f7853b961cdbc348b0f7c9a1"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ad5ec10b53cbb57e9a2e77b67e4e4368df56b54d6b00cc86398578f1c635f329"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:642df77484b2dcaf87d4237792246d8068653f9e0f5c025e2c692fc56b0dda70"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6a8b575ac45af1eaccbbcdcf710ab984fd50af048fe130672377f78aaff6fc1"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f955aa50d7d5220fcb6e38f69ea126eafecd812d96aeed5d5f3597f33fad43bb"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:ad26d4eeaa0d722b25814cce97335ecf1b707630258f14ac4d2ed3d1d8415265"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:ced63c054bdaf0298f62681d5dcae3afe60cbae332390bfb1acf0e23dcd25fc8"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2b04da24cbde33292ad34a40db9832a80ad12de26486ffeda883413c9e1b1d5e"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-win32.whl", hash = "sha256:18f12632ab516c47c1ac4841a78fddea6508a8284c7cf0f292cb1a523f2e2379"}, - {file = "psycopg2_binary-2.9.7-cp39-cp39-win_amd64.whl", hash = "sha256:eb3b8d55924a6058a26db69fb1d3e7e32695ff8b491835ba9f479537e14dcf9f"}, -] - -[[package]] -name = "pytz" -version = "2023.3" -description = "World timezone definitions, modern and historical" -optional = false -python-versions = "*" -files = [ - {file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb"}, - {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, -] - -[[package]] -name = "pyyaml" -version = "6.0.1" -description = "YAML parser and emitter for Python" -optional = false -python-versions = ">=3.6" -files = [ - {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, - {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, - {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, - {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, - {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, - {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, - {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, - {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, - {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, -] - -[[package]] -name = "setuptools" -version = "68.1.2" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "setuptools-68.1.2-py3-none-any.whl", hash = "sha256:3d8083eed2d13afc9426f227b24fd1659489ec107c0e86cec2ffdde5c92e790b"}, - {file = "setuptools-68.1.2.tar.gz", hash = "sha256:3d4dfa6d95f1b101d695a6160a7626e15583af71a5f52176efa5d39a054d475d"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5,<=7.1.2)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - -[[package]] -name = "sqlparse" -version = "0.4.4" -description = "A non-validating SQL parser." -optional = false -python-versions = ">=3.5" -files = [ - {file = "sqlparse-0.4.4-py3-none-any.whl", hash = "sha256:5430a4fe2ac7d0f93e66f1efc6e1338a41884b7ddf2a350cedd20ccc4d9d28f3"}, - {file = "sqlparse-0.4.4.tar.gz", hash = "sha256:d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c"}, -] - -[package.extras] -dev = ["build", "flake8"] -doc = ["sphinx"] -test = ["pytest", "pytest-cov"] - -[[package]] -name = "tzdata" -version = "2023.3" -description = "Provider of IANA time zone data" -optional = false -python-versions = ">=2" -files = [ - {file = "tzdata-2023.3-py2.py3-none-any.whl", hash = "sha256:7e65763eef3120314099b6939b5546db7adce1e7d6f2e179e3df563c70511eda"}, - {file = "tzdata-2023.3.tar.gz", hash = "sha256:11ef1e08e54acb0d4f95bdb1be05da659673de4acbd21bf9c69e94cc5e907a3a"}, -] - -[[package]] -name = "uritemplate" -version = "4.1.1" -description = "Implementation of RFC 6570 URI Templates" -optional = false -python-versions = ">=3.6" -files = [ - {file = "uritemplate-4.1.1-py2.py3-none-any.whl", hash = "sha256:830c08b8d99bdd312ea4ead05994a38e8936266f84b9a7878232db50b044e02e"}, - {file = "uritemplate-4.1.1.tar.gz", hash = "sha256:4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0"}, -] - -[[package]] -name = "whitenoise" -version = "6.5.0" -description = "Radically simplified static file serving for WSGI applications" -optional = false -python-versions = ">=3.7" -files = [ - {file = "whitenoise-6.5.0-py3-none-any.whl", hash = "sha256:16468e9ad2189f09f4a8c635a9031cc9bb2cdbc8e5e53365407acf99f7ade9ec"}, - {file = "whitenoise-6.5.0.tar.gz", hash = "sha256:15fe60546ac975b58e357ccaeb165a4ca2d0ab697e48450b8f0307ca368195a8"}, -] - -[package.extras] -brotli = ["Brotli"] - -[metadata] -lock-version = "2.0" -python-versions = "^3.11" -content-hash = "3dd42a88b7b79790671f3e4ca139c220ef0959b6512c0c3ed1128c4ede109fec" diff --git a/backend/poetry.toml b/backend/poetry.toml deleted file mode 100644 index 975eeee6..00000000 --- a/backend/poetry.toml +++ /dev/null @@ -1 +0,0 @@ -virtualenvs.in-project = true diff --git a/backend/pyproject.toml b/backend/pyproject.toml deleted file mode 100644 index 55618cb4..00000000 --- a/backend/pyproject.toml +++ /dev/null @@ -1,25 +0,0 @@ -[tool.poetry] -name = "backend" -version = "0.1.0" -description = "" -authors = ["Aveline-art <62368440+Aveline-art@users.noreply.github.com>"] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.11" -Django = "^4.2.1" -djangorestframework = "^3.14.0" -psycopg2-binary = "^2.9.6" -pyyaml = "^6.0" -uritemplate = "^4.1.1" - -[tool.poetry.group.staging] -optional = true - -[tool.poetry.group.staging.dependencies] -gunicorn = "^20.1.0" -whitenoise = "^6.4.0" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/backend/server/__init__.py b/backend/server/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/server/admin.py b/backend/server/admin.py deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/server/apps.py b/backend/server/apps.py deleted file mode 100644 index 4957d9e9..00000000 --- a/backend/server/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class SeverConfig(AppConfig): - default_auto_field = "django.db.models.BigAutoField" - name = "server" diff --git a/backend/server/fixtures/test_data.yaml b/backend/server/fixtures/test_data.yaml deleted file mode 100644 index a6e4b66b..00000000 --- a/backend/server/fixtures/test_data.yaml +++ /dev/null @@ -1,221 +0,0 @@ -# Skill -- model: server.Skill - pk: 92df2b94-ed1e-44cc-a664-4f80149c39f0 - fields: - name: Python -- model: server.Skill - pk: c56a5f44-fcbf-45e9-a14e-e2d672fc7080 - fields: - name: Django -- model: server.Skill - pk: f4be9666-4736-4fba-bf0a-7ef1d76eaca5 - fields: - name: Javascript - -# Role -- model: server.Role - pk: 36a18961-101e-4808-8f7d-24f143fcbb27 - fields: - name: All -- model: server.Role - pk: eb4ca87e-a8d0-4118-b4c2-22b8eb5d86c2 - fields: - name: Backend Developer -- model: server.Role - pk: 6e8711bf-6e24-4e6c-b2c2-e542e8616324 - fields: - name: Frontend Developer -- model: server.Role - pk: 8ab6bd23-3e55-436a-b678-2f9649487cd5 - fields: - name: UI/UX Designer - -# Project -- model: server.Project - pk: e080d5be-52d8-4dd4-aff5-8ac5f5d21c84 - fields: - name: CivicTechJobs - description: CivicTechJobs helps technology practitioners interested in having civic impact to find job opportunities from a central hub of listings -- model: server.Project - pk: e1598001-c891-4a85-970a-12b968ea57fe - fields: - name: VRMS - description: VRMS is a tool used for the engagement, support, and retention of a network of volunteers -- model: server.Project - pk: 300278d0-65aa-40e8-be01-2a61f1ff18d8 - fields: - name: Hackforla.org - description: The hackforla.org website is our organization's way of communicating with new volunteers, stakeholders, and donors - -# Recurring Event -- model: server.RecurringEvent - pk: 03aa9408-75c7-45f4-8e57-0b870bf428ec - fields: - name: CivicTechJobs Weekly All Hands - day_of_week: Wednesday - start_time: "17:00:00" - duration_in_minutes: 60 - project: e080d5be-52d8-4dd4-aff5-8ac5f5d21c84 -- model: server.RecurringEvent - pk: 2d641abe-438f-4005-9233-998d5d1b3f6f - fields: - name: CivicTechJobs Developer Meeting - day_of_week: Wednesday - start_time: "18:00:00" - duration_in_minutes: 30 - project: e080d5be-52d8-4dd4-aff5-8ac5f5d21c84 -- model: server.RecurringEvent - pk: 0ae12430-27ca-4864-be69-ae105f404558 - fields: - name: CivicTechJobs UI/UX Meeting - day_of_week: Wednesday - start_time: "18:00:00" - duration_in_minutes: 45 - project: e080d5be-52d8-4dd4-aff5-8ac5f5d21c84 -- model: server.RecurringEvent - pk: 3e967708-bfe7-4c43-b46b-758420f3c8cf - fields: - name: VRMS Weekly Meeting - day_of_week: Monday - start_time: "16:00:00" - duration_in_minutes: 60 - project: e1598001-c891-4a85-970a-12b968ea57fe -- model: server.RecurringEvent - pk: edee3c55-d1dd-45db-999e-99252d4994e0 - fields: - name: Hackforla.org Weekly Meeting - day_of_week: Tuesday - start_time: "17:00:00" - duration_in_minutes: 45 - project: 300278d0-65aa-40e8-be01-2a61f1ff18d8 -- model: server.RecurringEvent - pk: 94b0d02f-5170-4950-890f-6d6e30fa17b2 - fields: - name: Hackforla.org Deverloper Sync - day_of_week: Tuesday - start_time: "17:00:00" - duration_in_minutes: 15 - project: 300278d0-65aa-40e8-be01-2a61f1ff18d8 - -# Role for Recurring Event -- model: server.RoleXRecurringEvent - fields: - role: 36a18961-101e-4808-8f7d-24f143fcbb27 - recurring_event: 03aa9408-75c7-45f4-8e57-0b870bf428ec -- model: server.RoleXRecurringEvent - fields: - role: eb4ca87e-a8d0-4118-b4c2-22b8eb5d86c2 - recurring_event: 2d641abe-438f-4005-9233-998d5d1b3f6f -- model: server.RoleXRecurringEvent - fields: - role: 6e8711bf-6e24-4e6c-b2c2-e542e8616324 - recurring_event: 2d641abe-438f-4005-9233-998d5d1b3f6f -- model: server.RoleXRecurringEvent - fields: - role: 8ab6bd23-3e55-436a-b678-2f9649487cd5 - recurring_event: 0ae12430-27ca-4864-be69-ae105f404558 -- model: server.RoleXRecurringEvent - fields: - role: 36a18961-101e-4808-8f7d-24f143fcbb27 - recurring_event: 3e967708-bfe7-4c43-b46b-758420f3c8cf -- model: server.RoleXRecurringEvent - fields: - role: 36a18961-101e-4808-8f7d-24f143fcbb27 - recurring_event: edee3c55-d1dd-45db-999e-99252d4994e0 -- model: server.RoleXRecurringEvent - fields: - role: eb4ca87e-a8d0-4118-b4c2-22b8eb5d86c2 - recurring_event: 94b0d02f-5170-4950-890f-6d6e30fa17b2 -- model: server.RoleXRecurringEvent - fields: - role: 6e8711bf-6e24-4e6c-b2c2-e542e8616324 - recurring_event: 94b0d02f-5170-4950-890f-6d6e30fa17b2 - -# Opportunity -- model: server.Opportunity - pk: 1ad0916e-89f2-40d7-8d5a-1713a812a32b - fields: - project: e080d5be-52d8-4dd4-aff5-8ac5f5d21c84 - role: eb4ca87e-a8d0-4118-b4c2-22b8eb5d86c2 - experience_level: Trained - title: Backend developer needed for super fun oppp! - description: come build some backends with us in django - poster: 123@hackforla.org - hours_per_week: 8 - num_positions_available: 2 - posted_date: 2022-05-12 -- model: server.Opportunity - pk: f5369dca-9f5c-44dd-9c13-bcc181226c07 - fields: - project: e080d5be-52d8-4dd4-aff5-8ac5f5d21c84 - role: 6e8711bf-6e24-4e6c-b2c2-e542e8616324 - experience_level: Experienced - title: Frontend developer needed to jazz up our website - description: come make our website look nice!! - poster: abc@hackforla.org - hours_per_week: 16 - num_positions_available: 3 - posted_date: 2022-05-12 -- model: server.Opportunity - pk: 95d4c490-ee43-4fcc-a7c6-79e45ea918ec - fields: - project: e080d5be-52d8-4dd4-aff5-8ac5f5d21c84 - role: 8ab6bd23-3e55-436a-b678-2f9649487cd5 - experience_level: Learning - title: Looking for UI/UX Designers - description: Help us create great user experiences!! - poster: xyz@hackforla.org - hours_per_week: 8 - num_positions_available: 1 - posted_date: 2022-05-12 -- model: server.Opportunity - pk: 10923df3-7afc-4201-aa04-ea17b9db25ef - fields: - project: 300278d0-65aa-40e8-be01-2a61f1ff18d8 - role: 8ab6bd23-3e55-436a-b678-2f9649487cd5 - experience_level: Learning - title: UI/UX Designers for Hackforla.org Website - description: If you're interested in making our site even more beautiful, reach out!! - poster: xyz432@hackforla.org - hours_per_week: 10 - num_positions_available: 3 - posted_date: 2022-06-12 -- model: server.Opportunity - pk: cf009c34-611a-4d43-ae41-a789403946de - fields: - project: e1598001-c891-4a85-970a-12b968ea57fe - role: eb4ca87e-a8d0-4118-b4c2-22b8eb5d86c2 - experience_level: Trained - title: Python and Django developers needed - description: Help us add more functionality to our backends - poster: xyz123@hackforla.org - hours_per_week: 10 - num_positions_available: 3 - posted_date: 2022-06-12 - -# Skill for Opportunity -- model: server.OpportunityXSkill - fields: - opportunity: 1ad0916e-89f2-40d7-8d5a-1713a812a32b - skill: 92df2b94-ed1e-44cc-a664-4f80149c39f0 - is_required: true -- model: server.OpportunityXSkill - fields: - opportunity: 1ad0916e-89f2-40d7-8d5a-1713a812a32b - skill: c56a5f44-fcbf-45e9-a14e-e2d672fc7080 - is_required: false -- model: server.OpportunityXSkill - fields: - opportunity: f5369dca-9f5c-44dd-9c13-bcc181226c07 - skill: f4be9666-4736-4fba-bf0a-7ef1d76eaca5 - is_required: true -- model: server.OpportunityXSkill - fields: - opportunity: cf009c34-611a-4d43-ae41-a789403946de - skill: 92df2b94-ed1e-44cc-a664-4f80149c39f0 - is_required: true -- model: server.OpportunityXSkill - fields: - opportunity: cf009c34-611a-4d43-ae41-a789403946de - skill: c56a5f44-fcbf-45e9-a14e-e2d672fc7080 - is_required: true diff --git a/backend/server/migrations/0001_initial.py b/backend/server/migrations/0001_initial.py deleted file mode 100644 index c8c762c9..00000000 --- a/backend/server/migrations/0001_initial.py +++ /dev/null @@ -1,222 +0,0 @@ -# Generated by Django 4.0.4 on 2022-06-16 20:38 - -import uuid - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [] - - operations = [ - migrations.CreateModel( - name="Opportunity", - fields=[ - ( - "id", - models.UUIDField( - default=uuid.uuid4, - editable=False, - primary_key=True, - serialize=False, - unique=True, - ), - ), - ( - "experience_level", - models.CharField( - choices=[ - ("Learning", "Leaning"), - ("Trained", "Trained"), - ("Experienced", "Experienced"), - ("Supervisory", "Supervisory"), - ], - max_length=11, - ), - ), - ("title", models.CharField(max_length=100)), - ("description", models.TextField()), - ("poster", models.EmailField(max_length=100)), - ("hours_per_week", models.PositiveSmallIntegerField()), - ("num_positions_available", models.PositiveSmallIntegerField()), - ("posted_date", models.DateField(auto_now_add=True)), - ], - options={ - "db_table": "opportunity", - }, - ), - migrations.CreateModel( - name="Project", - fields=[ - ( - "id", - models.CharField(max_length=100, primary_key=True, serialize=False), - ), - ("name", models.SlugField(max_length=100)), - ("description", models.TextField()), - ], - options={ - "db_table": "project", - }, - ), - migrations.CreateModel( - name="RecurringEvent", - fields=[ - ( - "id", - models.CharField(max_length=100, primary_key=True, serialize=False), - ), - ("name", models.SlugField(max_length=100)), - ( - "day_of_week", - models.CharField( - choices=[ - ("Sunday", "Sunday"), - ("Monday", "Monday"), - ("Tuesday", "Tuesday"), - ("Wednesday", "Wednesday"), - ("Thursday", "Thursday"), - ("Friday", "Friday"), - ("Saturday", "Saturday"), - ], - max_length=9, - ), - ), - ("start_time", models.TimeField()), - ("duration_in_minutes", models.PositiveSmallIntegerField()), - ( - "project", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - related_name="recurring_events", - to="server.project", - ), - ), - ], - options={ - "db_table": "recurring_event", - }, - ), - migrations.CreateModel( - name="Role", - fields=[ - ( - "id", - models.CharField(max_length=100, primary_key=True, serialize=False), - ), - ("name", models.SlugField(max_length=100)), - ], - options={ - "db_table": "role", - }, - ), - migrations.CreateModel( - name="Skill", - fields=[ - ( - "id", - models.CharField(max_length=100, primary_key=True, serialize=False), - ), - ("name", models.SlugField(max_length=100)), - ], - options={ - "db_table": "skill", - }, - ), - migrations.CreateModel( - name="RoleXRecurringEvent", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ( - "recurring_event", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - to="server.recurringevent", - ), - ), - ( - "role", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, to="server.role" - ), - ), - ], - options={ - "db_table": "role__recurring_event", - "unique_together": {("role", "recurring_event")}, - }, - ), - migrations.AddField( - model_name="recurringevent", - name="roles", - field=models.ManyToManyField( - blank=True, through="server.RoleXRecurringEvent", to="server.role" - ), - ), - migrations.CreateModel( - name="OpportunityXSkill", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("is_required", models.BooleanField(blank=True, null=True)), - ( - "opportunity", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - related_name="opp_to_skill", - to="server.opportunity", - ), - ), - ( - "skill", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, to="server.skill" - ), - ), - ], - options={ - "db_table": "opportunity__skill", - "unique_together": {("opportunity", "skill")}, - }, - ), - migrations.AddField( - model_name="opportunity", - name="project", - field=models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, to="server.project" - ), - ), - migrations.AddField( - model_name="opportunity", - name="role", - field=models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, to="server.role" - ), - ), - migrations.AddField( - model_name="opportunity", - name="skills", - field=models.ManyToManyField( - blank=True, through="server.OpportunityXSkill", to="server.skill" - ), - ), - ] diff --git a/backend/server/migrations/0002_test.py b/backend/server/migrations/0002_test.py deleted file mode 100644 index 1028f41e..00000000 --- a/backend/server/migrations/0002_test.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 4.0.10 on 2023-04-02 03:54 - -import uuid - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("server", "0001_initial"), - ] - - operations = [ - migrations.CreateModel( - name="Test", - fields=[ - ( - "id", - models.UUIDField( - default=uuid.uuid4, - editable=False, - primary_key=True, - serialize=False, - unique=True, - ), - ), - ], - ), - ] diff --git a/backend/server/migrations/0003_opportunityxmeetings_opportunityxtech_and_more.py b/backend/server/migrations/0003_opportunityxmeetings_opportunityxtech_and_more.py deleted file mode 100644 index ed63df09..00000000 --- a/backend/server/migrations/0003_opportunityxmeetings_opportunityxtech_and_more.py +++ /dev/null @@ -1,175 +0,0 @@ -# Generated by Django 4.0.10 on 2023-04-02 06:24 - -from django.db import migrations, models -import django.db.models.deletion -import uuid - - -class Migration(migrations.Migration): - - dependencies = [ - ('server', '0002_test'), - ] - - operations = [ - migrations.CreateModel( - name='OpportunityXMeetings', - fields=[ - ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)), - ('meeting_id', models.IntegerField(unique=True)), - ('meeting_type', models.PositiveSmallIntegerField(choices=[(0, 'Not Attend'), (1, 'Could Attend'), (2, 'Should Attend')])), - ], - ), - migrations.CreateModel( - name='OpportunityXTech', - fields=[ - ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)), - ('tech_type', models.PositiveSmallIntegerField(choices=[(0, 'Preferred'), (1, 'Required')])), - ], - ), - migrations.AlterUniqueTogether( - name='opportunityxskill', - unique_together=None, - ), - migrations.RemoveField( - model_name='opportunityxskill', - name='opportunity', - ), - migrations.RemoveField( - model_name='opportunityxskill', - name='skill', - ), - migrations.RemoveField( - model_name='recurringevent', - name='project', - ), - migrations.RemoveField( - model_name='recurringevent', - name='roles', - ), - migrations.AlterUniqueTogether( - name='rolexrecurringevent', - unique_together=None, - ), - migrations.RemoveField( - model_name='rolexrecurringevent', - name='recurring_event', - ), - migrations.RemoveField( - model_name='rolexrecurringevent', - name='role', - ), - migrations.DeleteModel( - name='Test', - ), - migrations.RemoveField( - model_name='opportunity', - name='experience_level', - ), - migrations.RemoveField( - model_name='opportunity', - name='hours_per_week', - ), - migrations.RemoveField( - model_name='opportunity', - name='num_positions_available', - ), - migrations.RemoveField( - model_name='opportunity', - name='poster', - ), - migrations.RemoveField( - model_name='opportunity', - name='project', - ), - migrations.RemoveField( - model_name='opportunity', - name='role', - ), - migrations.RemoveField( - model_name='opportunity', - name='skills', - ), - migrations.RemoveField( - model_name='opportunity', - name='title', - ), - migrations.AddField( - model_name='opportunity', - name='experience_id', - field=models.IntegerField(null=True, unique=True, verbose_name='Experience Level ID'), - ), - migrations.AddField( - model_name='opportunity', - name='is_active', - field=models.BooleanField(null=True), - ), - migrations.AddField( - model_name='opportunity', - name='is_remote', - field=models.BooleanField(null=True), - ), - migrations.AddField( - model_name='opportunity', - name='max_commitment', - field=models.IntegerField(null=True), - ), - migrations.AddField( - model_name='opportunity', - name='max_duration', - field=models.IntegerField(null=True), - ), - migrations.AddField( - model_name='opportunity', - name='min_commitment', - field=models.IntegerField(null=True), - ), - migrations.AddField( - model_name='opportunity', - name='min_duration', - field=models.IntegerField(null=True), - ), - migrations.AddField( - model_name='opportunity', - name='project_id', - field=models.IntegerField(null=True, unique=True), - ), - migrations.AddField( - model_name='opportunity', - name='role_id', - field=models.IntegerField(null=True, unique=True), - ), - migrations.AlterField( - model_name='opportunity', - name='posted_date', - field=models.DateField(auto_now_add=True, null=True), - ), - migrations.DeleteModel( - name='OpportunityXSkill', - ), - migrations.DeleteModel( - name='Project', - ), - migrations.DeleteModel( - name='RecurringEvent', - ), - migrations.DeleteModel( - name='Role', - ), - migrations.DeleteModel( - name='RoleXRecurringEvent', - ), - migrations.DeleteModel( - name='Skill', - ), - migrations.AddField( - model_name='opportunityxtech', - name='opportunity_id', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='server.opportunity'), - ), - migrations.AddField( - model_name='opportunityxmeetings', - name='opportunity_id', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='server.opportunity'), - ), - ] diff --git a/backend/server/migrations/0004_post.py b/backend/server/migrations/0004_post.py deleted file mode 100644 index e95aada8..00000000 --- a/backend/server/migrations/0004_post.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 4.2.4 on 2024-04-27 00:15 - -from django.db import migrations, models -import django.utils.timezone -import uuid - - -class Migration(migrations.Migration): - - dependencies = [ - ('server', '0003_opportunityxmeetings_opportunityxtech_and_more'), - ] - - operations = [ - migrations.CreateModel( - name='Post', - fields=[ - ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('role', models.CharField(max_length=255)), - ('subrole', models.CharField(max_length=255)), - ('project', models.CharField(max_length=255)), - ('meetings_times', models.JSONField(default=list)), - ('difficulty_level', models.IntegerField()), - ('details', models.JSONField(default=dict)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('updated_at', models.DateTimeField(default=django.utils.timezone.now)), - ('updated_by_or_token', models.CharField(max_length=255)), - ], - options={ - 'db_table': 'post', - }, - ), - ] diff --git a/backend/server/migrations/__init__.py b/backend/server/migrations/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/server/models.py b/backend/server/models.py deleted file mode 100644 index c5c7a329..00000000 --- a/backend/server/models.py +++ /dev/null @@ -1,71 +0,0 @@ -import uuid - -from django.db import models -from django.utils.translation import gettext_lazy as _ - - -from django.utils import timezone - - -class Post(models.Model): - id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) - role = models.CharField(max_length=255) - subrole = models.CharField(max_length=255) - project = models.CharField(max_length=255) - meetings_times = models.JSONField(default=list) - difficulty_level = models.IntegerField() - details = models.JSONField(default=dict) - created_at = models.DateTimeField(default=timezone.now) - updated_at = models.DateTimeField(default=timezone.now) - updated_by_or_token = models.CharField(max_length=255) - - class Meta: - db_table = "post" - -class Opportunity(models.Model): - id = models.UUIDField( - primary_key=True, default=uuid.uuid4, editable=False, unique=True - ) - project_id = models.IntegerField(unique=True, null=True) # psudo-foreign_id - max_commitment = models.IntegerField(null=True) # hours/wk - min_commitment = models.IntegerField(null=True) # hours/wk - max_duration = models.IntegerField(null=True) # days - min_duration = models.IntegerField(null=True) # days - positions_available = models.PositiveSmallIntegerField - description = models.TextField() - posted_date = models.DateField(auto_now_add=True, null=True) - role_id = models.IntegerField(unique=True, null=True) # psudo-foreign_id - experience_id = models.IntegerField( - unique=True, null=True, verbose_name="Experience Level ID" - ) # psudo-foreign_id - is_remote = models.BooleanField(null=True) - is_active = models.BooleanField(null=True) - - class Meta: - db_table = "opportunity" - - -class OpportunityXMeetings(models.Model): - class MeetingType(models.IntegerChoices): - NOT_ATTEND = 0, _("Not Attend") - COULD_ATTEND = 1, _("Could Attend") - SHOULD_ATTEND = 2, _("Should Attend") - - id = models.UUIDField( - primary_key=True, default=uuid.uuid4, editable=False, unique=True - ) - opportunity_id = models.ForeignKey("Opportunity", on_delete=models.CASCADE) - meeting_id = models.IntegerField(unique=True) # psudo-foreign_id - meeting_type = models.PositiveSmallIntegerField(choices=MeetingType.choices) - - -class OpportunityXTech(models.Model): - class TechType(models.IntegerChoices): - PREFERRED = 0, _("Preferred") - REQUIRED = 1, _("Required") - - id = models.UUIDField( - primary_key=True, default=uuid.uuid4, editable=False, unique=True - ) - opportunity_id = models.ForeignKey("Opportunity", on_delete=models.CASCADE) - tech_type = models.PositiveSmallIntegerField(choices=TechType.choices) diff --git a/backend/server/serializers.py b/backend/server/serializers.py deleted file mode 100644 index f959f17e..00000000 --- a/backend/server/serializers.py +++ /dev/null @@ -1,29 +0,0 @@ -from django.contrib.auth.models import User -from rest_framework import serializers -from server.models import Opportunity, OpportunityXMeetings, OpportunityXTech - - -class UserSerializer(serializers.ModelSerializer): - class Meta: - model = User - fields = ["id", "username"] - - -class OpportunitySerializer(serializers.ModelSerializer): - meetings = serializers.ListField(child=serializers.IntegerField()) - - class Meta: - model = Opportunity - fields = "__all__" - - -class OpportunityXMeetingsSerializer(serializers.ModelSerializer): - class Meta: - model = OpportunityXMeetings - fields = "__all__" - - -class OpportunityXTechSerializer(serializers.ModelSerializer): - class Meta: - model = OpportunityXTech - fields = "__all__" diff --git a/backend/server/templates/swagger-ui.html b/backend/server/templates/swagger-ui.html deleted file mode 100644 index 1573fcf4..00000000 --- a/backend/server/templates/swagger-ui.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - Swagger - - - - - -
- - - - diff --git a/backend/server/tests.py b/backend/server/tests.py deleted file mode 100644 index d6035b80..00000000 --- a/backend/server/tests.py +++ /dev/null @@ -1,75 +0,0 @@ -from django.test import TestCase -from rest_framework.test import RequestsClient - -HOST = "http://localhost:8000" -BASE_URI = "/api" - - -class OpportunityTestCase(TestCase): - fixtures = [ - "server/fixtures/test_data", - ] - host = "http://localhost:8000" - base_uri = "/api/v1/opportunities/" - - def setUp(self): - client = RequestsClient() # noqa: F841 # pylint: disable=W0612 - - def test_list_opportunities(self): - response = self.client.get(f"{self.host}{self.base_uri}") - self.assertEqual(response.status_code, 200) - - def test_create_opportunity(self): - # make call to list_opps and get count of results - response = self.client.get(f"{self.host}{self.base_uri}") - self.assertEqual(response.status_code, 200) - opp_count = len(response.data) - - # create opp - data = { - "title": "New opp", - "description": "new opp for testing", - "poster": "test@abc.com", - "hours_per_week": 20, - "num_positions_available": 3, - "project": "e080d5be-52d8-4dd4-aff5-8ac5f5d21c84", - "role": "eb4ca87e-a8d0-4118-b4c2-22b8eb5d86c2", - "experience_level": "Trained", - "skills": [ - "92df2b94-ed1e-44cc-a664-4f80149c39f0", - "c56a5f44-fcbf-45e9-a14e-e2d672fc7080", - ], - } - response = self.client.post( - f"{self.host}{self.base_uri}", data=data, format="json" - ) - self.assertEqual(response.status_code, 201) - - # make another call to list_opps and validate count has been incremented - response = self.client.get(f"{self.host}{self.base_uri}") - self.assertEqual(response.status_code, 200) - self.assertEqual(len(response.data), opp_count + 1) - - def test_create_opportunity_missing_attr(self): - data = { - "description": "new opp for testing", - "poster": "test@abc.com", - "hours_per_week": 20, - "num_positions_available": 3, - "project": "e080d5be-52d8-4dd4-aff5-8ac5f5d21c84", - "role": "eb4ca87e-a8d0-4118-b4c2-22b8eb5d86c2", - "experience_level": "Trained", - } - response = self.client.post( - f"{self.host}{self.base_uri}", data=data, format="json" - ) - self.assertEqual(response.status_code, 400) - - -class HealthcheckTestCase(TestCase): - uri = "api/healthcheck" - - def test_healthcheck(self): - response = self.client.get(f"{HOST}{BASE_URI}{self.uri}", format="json") - self.assertEqual(response.status_code, 200) - self.assertEqual(response.json()["message"], "healthcheck") diff --git a/backend/server/urls.py b/backend/server/urls.py deleted file mode 100644 index b6524c2e..00000000 --- a/backend/server/urls.py +++ /dev/null @@ -1,30 +0,0 @@ -from django.urls import include, path -from django.views.generic import TemplateView -from rest_framework.routers import DefaultRouter -from rest_framework.schemas import get_schema_view -from server import views - -router = DefaultRouter() -router.register(r"opportunities", views.OpportunitiesViewSet, basename="opportunities") -router.register(r"users", views.UserViewSet, basename="user") - -urlpatterns = [ - path("", include(router.urls)), - path("", include("rest_framework.urls")), - path('healthcheck/', views.Healthcheck.as_view(), name='healthcheck'), - path( - "schema", - get_schema_view( - title="Your Project", description="API for all things …", version="1.0.0" - ), - name="openapi-schema", - ), - path( - "swagger/", - TemplateView.as_view( - template_name="swagger-ui.html", - extra_context={"schema_url": "openapi-schema"}, - ), - name="swagger-ui", - ), -] diff --git a/backend/server/views.py b/backend/server/views.py deleted file mode 100644 index 49b23dd4..00000000 --- a/backend/server/views.py +++ /dev/null @@ -1,43 +0,0 @@ -from django.contrib.auth.models import User -from rest_framework import generics, permissions, renderers, viewsets -from rest_framework.response import Response -from rest_framework.views import APIView -from server.models import Opportunity -from server.serializers import OpportunitySerializer, UserSerializer -import time -from django.conf import settings - -class OpportunitiesViewSet(viewsets.ModelViewSet): - """ - This viewset automatically provides `list`, `create`, `retrieve`, - `update` and `destroy` actions. - """ - - permission_classes = [permissions.IsAuthenticatedOrReadOnly] - queryset = Opportunity.objects.all() - serializer_class = OpportunitySerializer - - -class UserViewSet(viewsets.ReadOnlyModelViewSet): - """ - This viewset automatically provides `list` and `retrieve` actions. - """ - - permission_classes = [permissions.IsAuthenticatedOrReadOnly] - queryset = User.objects.all() - serializer_class = UserSerializer - - -class Healthcheck(APIView): - start_time = time.time() - - def get(self, request): - uptime_seconds = time.time() - self.start_time - uptime_hours = uptime_seconds / 3600 - - return Response({ - "message": "healthcheck", - "uptime": f"{uptime_hours:.2f} hours", - # "uptime": f"{uptime_seconds:.1f} seconds", - "version": settings.VERSION - }) \ No newline at end of file diff --git a/backend/setup.cfg b/backend/setup.cfg deleted file mode 100644 index c7fce016..00000000 --- a/backend/setup.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[isort] -profile = black - -[flake8] -max-line-length = 88 -extend-ignore = E203 - -[pylint] -max-line-length = 88 diff --git a/dev/django.dockerfile b/dev/django.dockerfile index acfd636b..60e9ee07 100644 --- a/dev/django.dockerfile +++ b/dev/django.dockerfile @@ -15,4 +15,6 @@ ENV PATH=/opt/poetry/bin:$PATH # Download dependencies COPY pyproject.toml ./ COPY poetry.lock ./ + RUN poetry config virtualenvs.create false && poetry install --no-interaction --sync + diff --git a/docker-compose.yml b/docker-compose.yml index 6c18627f..0d9320bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,17 +9,12 @@ services: env_file: - ./dev/dev.env - django: build: context: ./backend dockerfile: ../dev/django.dockerfile container_name: django - command: > - sh -c "python manage.py makemigrations && - python manage.py migrate && - python manage.py runserver 0.0.0.0:8000 && - python manage.py generateschema --file openapi-schema.yml" + command: ["python", "manage.py", "test"] volumes: - ./backend/:/code ports: @@ -29,32 +24,3 @@ services: depends_on: - pgdb - # webpack: - # build: - # context: ./frontend - # dockerfile: ../dev/webpack.dockerfile - # container_name: webpack - # command: npm --prefix ./frontend run watch # We need the prefix because we are mounting from parent rather than frontend - # env_file: - # - ./dev/dev.env - # volumes: - # - ./:/code # The webpack output files are now in a sibling directory, therefore, we need to mount to parent - # - node_modules:/code/node_modules # Need to persist node_modules directory to prevent it from being overwritten by local directory mount (on line 40). This ensures npm packages installed during Docker build are available at runtime. - - # linter: - # profiles: ["lint"] - # build: - # context: . - # dockerfile: ./dev/linter.dockerfile - # container_name: linter - # environment: - # - PRE_COMMIT_HOME=${HOME}/.cache/pre-commit - # user: ${UID}:${GID} - # env_file: - # - ./dev/linter.env - # volumes: - # - .:/src:rw - # - ${HOME}/.cache:${HOME}/.cache:rw - -volumes: - node_modules: