From f1b98383d6f62517139d4edfbec68df2efdfd25f Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Thu, 22 Feb 2024 14:47:34 -0400 Subject: [PATCH 1/2] fix: Fix initial issues and rename the apps --- .envs/.local/.postgres | 2 +- .envs/.production/.django | 2 +- .envs/.production/.postgres | 2 +- .github/ISSUE_TEMPLATE/bug-report.yml | 14 +- .github/ISSUE_TEMPLATE/config.yml | 16 +- .../ISSUE_TEMPLATE/documentation-report.yml | 10 +- .github/ISSUE_TEMPLATE/feature-request.yml | 12 +- .github/workflows/main.yaml | 2 +- .github/workflows/release.yaml | 2 +- .makim.yaml | 34 +++- .pre-commit-config.yaml | 4 +- .releaserc.json | 6 +- README.md | 24 +-- conda/dev.yaml | 2 +- containers/Dockerfile | 16 +- containers/app/Dockerfile | 2 +- containers/app/scripts/entrypoint.sh | 4 +- containers/compose.local.yml | 2 +- containers/compose.production.yml | 2 +- containers/traefik/traefik.yml | 4 +- docs/api/references.md | 2 +- docs/api/references.rst | 4 +- docs/contributing.md | 22 ++- docs/example.ipynb | 6 +- docs/index.md | 4 +- docs/installation.md | 18 +- mkdocs.yaml | 14 +- poetry.lock | 17 +- pyproject.toml | 16 +- src/config/api_router.py | 2 +- src/config/asgi.py | 6 +- src/config/settings/base.py | 34 ++-- src/config/settings/production.py | 8 +- src/config/urls.py | 13 +- src/config/wsgi.py | 6 +- .../__init__.py | 0 .../conftest.py | 6 +- .../contrib/__init__.py | 0 .../contrib/sites/__init__.py | 0 .../contrib/sites/migrations/0001_initial.py | 0 .../migrations/0002_alter_domain_unique.py | 0 .../0003_set_site_domain_and_name.py | 4 +- .../0004_alter_options_ordering_domain.py | 0 .../contrib/sites/migrations/__init__.py | 0 .../forms.py | 0 .../migrations/0001_initial.py | 2 +- .../migrations/__init__.py | 0 .../models.py | 4 +- .../static/css/project.css | 0 .../static/css/styles.css | 0 .../static/fonts/.gitkeep | 0 .../static/images/favicons/favicon.ico | Bin .../static/images/home/avataaars.svg | 0 .../static/images/home/portfolio/cabin.png | Bin .../static/images/home/portfolio/cake.png | Bin .../static/images/home/portfolio/circus.png | Bin .../static/images/home/portfolio/game.png | Bin .../static/images/home/portfolio/safe.png | Bin .../images/home/portfolio/submarine.png | Bin .../static/js/project.js | 0 .../static/js/scripts.js | 0 .../templates/403.html | 0 .../templates/403_csrf.html | 0 .../templates/404.html | 0 .../templates/500.html | 0 .../templates/account/account_inactive.html | 0 .../templates/account/base.html | 0 .../templates/account/email.html | 0 .../templates/account/email_confirm.html | 0 .../templates/account/login.html | 0 .../templates/account/logout.html | 0 .../templates/account/password_change.html | 0 .../templates/account/password_reset.html | 0 .../account/password_reset_done.html | 0 .../account/password_reset_from_key.html | 0 .../account/password_reset_from_key_done.html | 0 .../templates/account/password_set.html | 0 .../templates/account/signup.html | 0 .../templates/account/signup_closed.html | 0 .../templates/account/verification_sent.html | 0 .../account/verified_email_required.html | 0 .../templates/base.html | 23 ++- .../templates/pages/about.html | 2 +- .../templates/pages/home.html | 6 +- .../templates/users/user_detail.html | 53 ++++++ .../templates/users/user_form.html | 0 .../urls.py | 4 +- .../users/__init__.py | 0 .../users/adapters.py | 2 +- .../users/admin.py | 2 +- .../users/api/__init__.py | 0 .../users/api/serializers.py | 2 +- .../users/api/views.py | 3 + .../users/apps.py | 4 +- .../users/context_processors.py | 0 .../users/forms.py | 0 .../users/managers.py | 2 +- .../users/migrations/0001_initial.py | 4 +- .../users/migrations/__init__.py | 0 .../users/models.py | 4 +- .../users/tests/__init__.py | 0 .../users/tests/factories.py | 0 .../users/tests/test_admin.py | 4 +- .../users/tests/test_drf_urls.py | 2 +- .../users/tests/test_drf_views.py | 4 +- .../users/tests/test_forms.py | 4 +- .../users/tests/test_managers.py | 2 +- .../users/tests/test_models.py | 2 +- .../users/tests/test_swagger.py | 0 .../users/tests/test_urls.py | 2 +- .../users/tests/test_views.py | 8 +- .../users/urls.py | 2 +- .../users/views.py | 0 .../views.py | 0 src/growth_plan/forms.py | 6 +- src/growth_plan/migrations/0001_initial.py | 2 +- .../templates/users/user_detail.html | 35 ---- src/linker/forms.py | 25 --- src/linker/migrations/0001_initial.py | 28 --- src/linker/models.py | 34 ---- src/locale/en_US/LC_MESSAGES/django.po | 2 +- src/locale/fr_FR/LC_MESSAGES/django.po | 170 +++++++++--------- src/locale/pt_BR/LC_MESSAGES/django.po | 170 +++++++++--------- src/manage.py | 4 +- src/{linker => one_on_one}/__init__.py | 0 src/{linker => one_on_one}/admin.py | 0 src/{linker => one_on_one}/apps.py | 2 +- src/one_on_one/forms.py | 53 ++++++ src/one_on_one/migrations/0001_initial.py | 34 ++++ .../migrations/__init__.py | 0 src/one_on_one/models.py | 57 ++++++ .../templates/link-confirm-delete.html | 21 +++ src/one_on_one/templates/link-form.html | 76 ++++++++ src/one_on_one/templates/link-list.html | 38 ++++ src/{linker => one_on_one}/tests.py | 0 src/{linker => one_on_one}/urls.py | 4 +- src/{linker => one_on_one}/views.py | 10 +- src/projects/migrations/0001_initial.py | 4 +- src/projects/models.py | 2 +- src/projects/templates/form.html | 18 +- src/projects/templates/list.html | 2 +- src/projects/views.py | 2 +- 142 files changed, 786 insertions(+), 504 deletions(-) rename src/{growth_plan_linker => growth_forge}/__init__.py (100%) rename src/{growth_plan_linker => growth_forge}/conftest.py (56%) rename src/{growth_plan_linker => growth_forge}/contrib/__init__.py (100%) rename src/{growth_plan_linker => growth_forge}/contrib/sites/__init__.py (100%) rename src/{growth_plan_linker => growth_forge}/contrib/sites/migrations/0001_initial.py (100%) rename src/{growth_plan_linker => growth_forge}/contrib/sites/migrations/0002_alter_domain_unique.py (100%) rename src/{growth_plan_linker => growth_forge}/contrib/sites/migrations/0003_set_site_domain_and_name.py (95%) rename src/{growth_plan_linker => growth_forge}/contrib/sites/migrations/0004_alter_options_ordering_domain.py (100%) rename src/{growth_plan_linker => growth_forge}/contrib/sites/migrations/__init__.py (100%) rename src/{growth_plan_linker => growth_forge}/forms.py (100%) rename src/{growth_plan_linker => growth_forge}/migrations/0001_initial.py (94%) rename src/{growth_plan_linker => growth_forge}/migrations/__init__.py (100%) rename src/{growth_plan_linker => growth_forge}/models.py (87%) rename src/{growth_plan_linker => growth_forge}/static/css/project.css (100%) rename src/{growth_plan_linker => growth_forge}/static/css/styles.css (100%) rename src/{growth_plan_linker => growth_forge}/static/fonts/.gitkeep (100%) rename src/{growth_plan_linker => growth_forge}/static/images/favicons/favicon.ico (100%) rename src/{growth_plan_linker => growth_forge}/static/images/home/avataaars.svg (100%) rename src/{growth_plan_linker => growth_forge}/static/images/home/portfolio/cabin.png (100%) rename src/{growth_plan_linker => growth_forge}/static/images/home/portfolio/cake.png (100%) rename src/{growth_plan_linker => growth_forge}/static/images/home/portfolio/circus.png (100%) rename src/{growth_plan_linker => growth_forge}/static/images/home/portfolio/game.png (100%) rename src/{growth_plan_linker => growth_forge}/static/images/home/portfolio/safe.png (100%) rename src/{growth_plan_linker => growth_forge}/static/images/home/portfolio/submarine.png (100%) rename src/{growth_plan_linker => growth_forge}/static/js/project.js (100%) rename src/{growth_plan_linker => growth_forge}/static/js/scripts.js (100%) rename src/{growth_plan_linker => growth_forge}/templates/403.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/403_csrf.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/404.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/500.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/account_inactive.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/base.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/email.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/email_confirm.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/login.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/logout.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/password_change.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/password_reset.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/password_reset_done.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/password_reset_from_key.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/password_reset_from_key_done.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/password_set.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/signup.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/signup_closed.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/verification_sent.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/account/verified_email_required.html (100%) rename src/{growth_plan_linker => growth_forge}/templates/base.html (92%) rename src/{growth_plan_linker => growth_forge}/templates/pages/about.html (92%) rename src/{growth_plan_linker => growth_forge}/templates/pages/home.html (99%) create mode 100644 src/growth_forge/templates/users/user_detail.html rename src/{growth_plan_linker => growth_forge}/templates/users/user_form.html (100%) rename src/{growth_plan_linker => growth_forge}/urls.py (68%) rename src/{growth_plan_linker => growth_forge}/users/__init__.py (100%) rename src/{growth_plan_linker => growth_forge}/users/adapters.py (96%) rename src/{growth_plan_linker => growth_forge}/users/admin.py (97%) rename src/{growth_plan_linker => growth_forge}/users/api/__init__.py (100%) rename src/{growth_plan_linker => growth_forge}/users/api/serializers.py (85%) rename src/{growth_plan_linker => growth_forge}/users/api/views.py (91%) rename src/{growth_plan_linker => growth_forge}/users/apps.py (69%) rename src/{growth_plan_linker => growth_forge}/users/context_processors.py (100%) rename src/{growth_plan_linker => growth_forge}/users/forms.py (100%) rename src/{growth_plan_linker => growth_forge}/users/managers.py (97%) rename src/{growth_plan_linker => growth_forge}/users/migrations/0001_initial.py (97%) rename src/{growth_plan_linker => growth_forge}/users/migrations/__init__.py (100%) rename src/{growth_plan_linker => growth_forge}/users/models.py (90%) rename src/{growth_plan_linker => growth_forge}/users/tests/__init__.py (100%) rename src/{growth_plan_linker => growth_forge}/users/tests/factories.py (100%) rename src/{growth_plan_linker => growth_forge}/users/tests/test_admin.py (95%) rename src/{growth_plan_linker => growth_forge}/users/tests/test_drf_urls.py (92%) rename src/{growth_plan_linker => growth_forge}/users/tests/test_drf_views.py (89%) rename src/{growth_plan_linker => growth_forge}/users/tests/test_forms.py (90%) rename src/{growth_plan_linker => growth_forge}/users/tests/test_managers.py (97%) rename src/{growth_plan_linker => growth_forge}/users/tests/test_models.py (68%) rename src/{growth_plan_linker => growth_forge}/users/tests/test_swagger.py (100%) rename src/{growth_plan_linker => growth_forge}/users/tests/test_urls.py (91%) rename src/{growth_plan_linker => growth_forge}/users/tests/test_views.py (93%) rename src/{growth_plan_linker => growth_forge}/users/urls.py (87%) rename src/{growth_plan_linker => growth_forge}/users/views.py (100%) rename src/{growth_plan_linker => growth_forge}/views.py (100%) delete mode 100644 src/growth_plan_linker/templates/users/user_detail.html delete mode 100644 src/linker/forms.py delete mode 100644 src/linker/migrations/0001_initial.py delete mode 100644 src/linker/models.py rename src/{linker => one_on_one}/__init__.py (100%) rename src/{linker => one_on_one}/admin.py (100%) rename src/{linker => one_on_one}/apps.py (83%) create mode 100644 src/one_on_one/forms.py create mode 100644 src/one_on_one/migrations/0001_initial.py rename src/{linker => one_on_one}/migrations/__init__.py (100%) create mode 100644 src/one_on_one/models.py create mode 100644 src/one_on_one/templates/link-confirm-delete.html create mode 100644 src/one_on_one/templates/link-form.html create mode 100644 src/one_on_one/templates/link-list.html rename src/{linker => one_on_one}/tests.py (100%) rename src/{linker => one_on_one}/urls.py (68%) rename src/{linker => one_on_one}/views.py (79%) diff --git a/.envs/.local/.postgres b/.envs/.local/.postgres index 46c46e9..090f4c6 100644 --- a/.envs/.local/.postgres +++ b/.envs/.local/.postgres @@ -2,6 +2,6 @@ # ------------------------------------------------------------------------------ POSTGRES_HOST=postgres POSTGRES_PORT=5432 -POSTGRES_DB=growth_plan_linker +POSTGRES_DB=growth_forge POSTGRES_USER=debug POSTGRES_PASSWORD=debug diff --git a/.envs/.production/.django b/.envs/.production/.django index 89e7fc0..9b5fa1e 100644 --- a/.envs/.production/.django +++ b/.envs/.production/.django @@ -4,7 +4,7 @@ DJANGO_SETTINGS_MODULE=config.settings.production DJANGO_SECRET_KEY=rzB5Sl2LAHyQOR5SAKqc0KeJTyUjNYVhd0ovG6H1dGrdvpd2FtZ9phEacFvFcbd0 DJANGO_ADMIN_URL=Rz4fpz5g02YMT9VXPQ4QMu8J3hoXOIBa/ -DJANGO_ALLOWED_HOSTS=.https://opensciencelabs.github.io/growth-plan-linker +DJANGO_ALLOWED_HOSTS=.https://opensciencelabs.github.io/growth-forge # Security # ------------------------------------------------------------------------------ diff --git a/.envs/.production/.postgres b/.envs/.production/.postgres index 46c46e9..090f4c6 100644 --- a/.envs/.production/.postgres +++ b/.envs/.production/.postgres @@ -2,6 +2,6 @@ # ------------------------------------------------------------------------------ POSTGRES_HOST=postgres POSTGRES_PORT=5432 -POSTGRES_DB=growth_plan_linker +POSTGRES_DB=growth_forge POSTGRES_USER=debug POSTGRES_PASSWORD=debug diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index c450856..f466421 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -7,7 +7,7 @@ body: - type: markdown attributes: value: > - **Thank you for wanting to report a bug in Growth Plan Linker!** + **Thank you for wanting to report a bug in Growth Forge!** ⚠ @@ -15,7 +15,7 @@ body: GitHub][issue search]. - [issue search]: https://github.com/xmnlab/growth-plan-linker.git/issues?q=is%3Aopen+is%3Aissue+label%3Abug + [issue search]: https://github.com/xmnlab/growth-forge.git/issues?q=is%3Aopen+is%3Aissue+label%3Abug - type: textarea attributes: @@ -124,14 +124,14 @@ body: - type: textarea attributes: - # label: Growth Plan Linker version + # label: Growth Forge version # description: >- - # Paste verbatim output from `Growth Plan Linker --version` below, under the prompt line. + # Paste verbatim output from `Growth Forge --version` below, under the prompt line. # Don't wrap it with triple backticks — your whole input will be # turned into a code snippet automatically. render: console placeholder: | - python -m pip show Growth Plan Linker + python -m pip show Growth Forge validations: required: true @@ -139,9 +139,9 @@ body: attributes: label: Code of Conduct description: | - Read the [`Growth Plan Linker` Code of Conduct][CoC] first. + Read the [`Growth Forge` Code of Conduct][CoC] first. - [CoC]: https://github.com/xmnlab/growth-plan-linker.git/coc/CODE_OF_CONDUCT.md + [CoC]: https://github.com/xmnlab/growth-forge.git/coc/CODE_OF_CONDUCT.md options: - label: I agree to follow the Code of Conduct required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index ca0209d..62a47b9 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,14 +2,14 @@ blank_issues_enabled: true contact_links: - name: 🙋 Usage Questions - url: https://github.com/xmnlab/growth-plan-linker.git/discussions + url: https://github.com/xmnlab/growth-forge.git/discussions about: | - Use Growth Plan Linker's GitHub Discussions to ask "How do I do X with Growth Plan Linker?". + Use Growth Forge's GitHub Discussions to ask "How do I do X with Growth Forge?". - name: 📖 Tutorial - url: https://github.com/xmnlab/growth-plan-linker.git + url: https://github.com/xmnlab/growth-forge.git about: | - The Growth Plan Linker tutorial is continually updated and provides an in depth walkthrough - of how to use the latest release of Growth Plan Linker. - - name: 📝 Growth Plan Linker Code of Conduct - url: https://github.com/xmnlab/growth-plan-linker.git/coc/CODE_OF_CONDUCT.md - about: Expectations for how people will interact with each other on Growth Plan Linker's GitHub. + The Growth Forge tutorial is continually updated and provides an in depth walkthrough + of how to use the latest release of Growth Forge. + - name: 📝 Growth Forge Code of Conduct + url: https://github.com/xmnlab/growth-forge.git/coc/CODE_OF_CONDUCT.md + about: Expectations for how people will interact with each other on Growth Forge's GitHub. diff --git a/.github/ISSUE_TEMPLATE/documentation-report.yml b/.github/ISSUE_TEMPLATE/documentation-report.yml index 73b6d3f..ecf9e08 100644 --- a/.github/ISSUE_TEMPLATE/documentation-report.yml +++ b/.github/ISSUE_TEMPLATE/documentation-report.yml @@ -7,7 +7,7 @@ body: - type: markdown attributes: value: > - **Thank you for wanting to report a problem with Growth Plan Linker's documentation!** + **Thank you for wanting to report a problem with Growth Forge's documentation!** ⚠ @@ -15,7 +15,7 @@ body: GitHub][issue search]. - [issue search]: https://github.com/xmnlab/growth-plan-linker.git/issues?q=is%3Aopen+is%3Aissue+label%3Adocs + [issue search]: https://github.com/xmnlab/growth-forge.git/issues?q=is%3Aopen+is%3Aissue+label%3Adocs - type: textarea attributes: @@ -25,7 +25,7 @@ body: If there are external references that are related please link them here as well. placeholder: >- - I was reading the Growth Plan Linker documentation for Growth Plan Linker version X and I'm having + I was reading the Growth Forge documentation for Growth Forge version X and I'm having problems understanding Y. It would be very helpful if that got rephrased as Z. validations: @@ -43,9 +43,9 @@ body: attributes: label: Code of Conduct description: | - Read the [`Growth Plan Linker` Code of Conduct][CoC] first. + Read the [`Growth Forge` Code of Conduct][CoC] first. - [CoC]: https://github.com/xmnlab/growth-plan-linker.git/blob/main/CODE_OF_CONDUCT.md + [CoC]: https://github.com/xmnlab/growth-forge.git/blob/main/CODE_OF_CONDUCT.md options: - label: I agree to follow the Code of Conduct required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 72749da..53e98ac 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -7,7 +7,7 @@ body: - type: markdown attributes: value: > - **Thank you for wanting to suggest a feature for Growth Plan Linker!** + **Thank you for wanting to suggest a feature for Growth Forge!** ⚠ @@ -17,7 +17,7 @@ body: already be implemented in a development release. - [issue search]: https://github.com/xmnlab/growth-plan-linker.git/issues?q=is%3Aopen+is%3Aissue+label%3Afeat%2Fenhancement + [issue search]: https://github.com/xmnlab/growth-forge.git/issues?q=is%3Aopen+is%3Aissue+label%3Afeat%2Fenhancement - type: textarea attributes: @@ -28,7 +28,7 @@ body: What's the problem this feature will solve? What are you trying to do, that you are unable to achieve - with the **latest** release of Growth Plan Linker? + with the **latest** release of Growth Forge? * Provide examples of real-world use cases that this would enable @@ -44,7 +44,7 @@ body: If there are external references or other GitHub Issues that are related please link them here as well. placeholder: >- - I am trying to do X with Growth Plan Linker version x.y.z and I think that implementing + I am trying to do X with Growth Forge version x.y.z and I think that implementing new feature Y would be very helpful for me and every other user because of Z. validations: required: true @@ -70,9 +70,9 @@ body: attributes: label: Code of Conduct description: | - Read the [`Growth Plan Linker` Code of Conduct][CoC] first. + Read the [`Growth Forge` Code of Conduct][CoC] first. - [CoC]: https://github.com/xmnlab/growth-plan-linker.git/coc/CODE_OF_CONDUCT.md + [CoC]: https://github.com/xmnlab/growth-forge.git/coc/CODE_OF_CONDUCT.md options: - label: I agree to follow the Code of Conduct required: true diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8b3a851..669c87c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -26,7 +26,7 @@ jobs: miniforge-version: latest environment-file: conda/dev.yaml channels: conda-forge,nodefaults - activate-environment: growth-plan-linker + activate-environment: growth-forge auto-update-conda: true conda-solver: libmamba diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index df9b35b..af49aeb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,7 +30,7 @@ jobs: miniforge-version: latest environment-file: conda/dev.yaml channels: conda-forge,nodefaults - activate-environment: growth-plan-linker + activate-environment: growth-forge auto-update-conda: true conda-solver: libmamba diff --git a/.makim.yaml b/.makim.yaml index 9f401fa..20376f1 100644 --- a/.makim.yaml +++ b/.makim.yaml @@ -121,11 +121,9 @@ groups: CWD=$(pwd) CMD_FLAG="{{ '--check' if args.check else '' }} --no-input" - for app in 'sites' 'growth_plan_linker' 'projects' 'linker' ''; do - echo -e "\nMaking migration files for: '${app}' ...\n" - CMD="python manage.py makemigrations ${CMD_FLAG} ${app}" - sugar run --service app --cmd $CMD - done + echo -e "\nMaking migration files ...\n" + CMD="python manage.py makemigrations ${CMD_FLAG} sites growth_forge projects one_on_one growth_plan" + sugar run --service app --cmd $CMD echo "[II] postgres is running." @@ -138,3 +136,29 @@ groups: CMD="python manage.py migrate --no-input" sugar run --service app --cmd $CMD + + create-superuser: + args: + email: + help: Specify the username + type: string + required: True + username: + help: Specify the username + type: string + required: True + password: + help: Specify the password + type: string + required: True + help: create an admin user + shell: bash + run: | + sugar ext start --services postgres --options -d + echo "[II] postgres is running." + + export DJANGO_SUPERUSER_PASSWORD={{ args.password }} + export DJANGO_SUPERUSER_USERNAME={{ args.username }} + CMD="python manage.py createsuperuser --noinput --email {{ args.email }}" + + sugar run --service app --cmd $CMD --options --env DJANGO_SUPERUSER_PASSWORD=$DJANGO_SUPERUSER_PASSWORD --env DJANGO_SUPERUSER_USERNAME=$DJANGO_SUPERUSER_USERNAME diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 98fcc7d..ef4ff03 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -82,7 +82,7 @@ repos: name: vulture entry: vulture --min-confidence 80 language: system - files: "src/growth-plan-linker" + files: "src/growth_forge" description: Find unused Python code. pass_filenames: true types: @@ -92,7 +92,7 @@ repos: name: mccabe entry: python -m mccabe --min 10 language: system - files: "src/growth-plan-linker" + files: "src/growth_forge" pass_filenames: true types: - python diff --git a/.releaserc.json b/.releaserc.json index d9eed6f..c4b09b8 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -8,12 +8,12 @@ { "replacements": [ { - "files": ["src/growth_plan_linker/__init__.py"], + "files": ["src/growth_forge/__init__.py"], "from": "return '.*' # semantic-release", "to": "return '${nextRelease.version}' # semantic-release", "results": [ { - "file": "src/growth_plan_linker/__init__.py", + "file": "src/growth_forge/__init__.py", "hasChanged": true, "numMatches": 1, "numReplacements": 1 @@ -65,7 +65,7 @@ "assets": [ "pyproject.toml", "docs/changelog.md", - "src/growth_plan_linker/__init__.py" + "src/growth_forge/__init__.py" ], "message": "chore(release): ${nextRelease.version}" } diff --git a/README.md b/README.md index cc7b7b6..a583675 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Growth-Plan-Linker +# GrowthForge -Growth-Plan-Linker is a simplified feedback exchange platform designed to -facilitate periodic feedback between individuals within specific projects. It -aims to streamline communication and insights sharing, enhancing project -collaboration and personal development. +GrowthForge is a simplified feedback exchange platform designed to facilitate +periodic feedback between individuals within specific projects. It aims to +streamline communication and insights sharing, enhancing project collaboration +and personal development. -- Documentation: +- Documentation: ## Features -Growth-Plan-Linker includes several key features to manage feedback efficiently: +GrowthForge includes several key features to manage feedback efficiently: ### Projects @@ -60,13 +60,13 @@ Growth-Plan-Linker includes several key features to manage feedback efficiently: ## Contributing -Growth-Plan-Linker is open for contributions. Whether it's feature requests, bug -reports, or code contributions, we welcome your input to make Growth-Plan-Linker +GrowthForge is open for contributions. Whether it's feature requests, bug +reports, or code contributions, we welcome your input to make GrowthForge better. Please see our contributing guidelines for more information. ## License -Growth-Plan-Linker is licensed under the BSD 3-Clause License. +GrowthForge is licensed under the BSD 3-Clause License. ## Contact @@ -74,5 +74,5 @@ For support or to get in touch with the developers, please open an issue. --- -We hope Growth-Plan-Linker enhances your project collaboration and personal -development efforts! +We hope GrowthForge enhances your project collaboration and personal development +efforts! diff --git a/conda/dev.yaml b/conda/dev.yaml index 25fb5b7..e3b2111 100644 --- a/conda/dev.yaml +++ b/conda/dev.yaml @@ -1,4 +1,4 @@ -name: growth-plan-linker +name: growth-forge channels: - nodefaults - conda-forge diff --git a/containers/Dockerfile b/containers/Dockerfile index ff15f37..00d27bb 100644 --- a/containers/Dockerfile +++ b/containers/Dockerfile @@ -3,9 +3,9 @@ FROM condaforge/mambaforge:latest LABEL maintainer="Ivan Ogasawara " -LABEL org.opencontainers.image.title="Growth Plan Linker" -LABEL org.opencontainers.image.authors="Growth Plan Linker Team" -LABEL org.opencontainers.image.source="https://github.com/xmnlab/growth-plan-linker.git" +LABEL org.opencontainers.image.title="Growth Forge" +LABEL org.opencontainers.image.authors="Growth Forge Team" +LABEL org.opencontainers.image.source="https://github.com/xmnlab/growth-forge.git" LABEL org.opencontainers.image.version="latest" LABEL org.opencontainers.image.description="The main objective of this platform is to offer a space to handle and organize feedback between two people" @@ -18,7 +18,7 @@ SHELL ["/bin/bash", "-c"] # executing commands with /bin/bash -c # Needed to have the micromamba activate command configured etc. -ENV ENV_NAME=growth_plan_linker +ENV ENV_NAME=growth_forge ENV DEBIAN_FRONTEND=noninteractive ARG UID=1000 ARG GID=1000 @@ -39,9 +39,9 @@ RUN apt-get update && \ vim && \ rm -rf /var/lib/apt/lists/* -USER growth_plan_linker +USER growth_forge -WORKDIR /growth-plan-linker +WORKDIR /growth-forge COPY pyproject.toml . @@ -54,10 +54,10 @@ RUN mamba install -y poetry && \ poetry install --no-dev --no-interaction --no-ansi -COPY . /growth-plan-linker/ +COPY . /growth-forge/ COPY . . COPY compose.yaml . -CMD ["python", "growth_plan_linker.py"] +CMD ["python", "growth_forge.py"] diff --git a/containers/app/Dockerfile b/containers/app/Dockerfile index 763f730..016383b 100644 --- a/containers/app/Dockerfile +++ b/containers/app/Dockerfile @@ -18,7 +18,7 @@ SHELL ["/bin/bash", "-c"] # executing commands with /bin/bash -c # Needed to have the micromamba activate command configured etc. -ENV ENV_NAME=growth-plan-linker +ENV ENV_NAME=growth-forge ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC ARG UID=1000 diff --git a/containers/app/scripts/entrypoint.sh b/containers/app/scripts/entrypoint.sh index 21cc518..946e1f9 100755 --- a/containers/app/scripts/entrypoint.sh +++ b/containers/app/scripts/entrypoint.sh @@ -10,8 +10,8 @@ if [ $is_conda_in_path == 0 ]; then echo "[II] included conda to the PATH" fi -echo "[II] activate growth-plan-linker" -source activate growth-plan-linker +echo "[II] activate growth-forge" +source activate growth-forge pushd /opt/appfiles if [[ "${ENV:-dev}" != "dev" ]]; then diff --git a/containers/compose.local.yml b/containers/compose.local.yml index 2810a6c..4025097 100644 --- a/containers/compose.local.yml +++ b/containers/compose.local.yml @@ -45,7 +45,7 @@ services: volumes: - ./docs:/docs:z - ./config:/app/config:z - - ./growth_plan_linker:/app/growth_plan_linker:z + - ./growth_forge:/app/growth_forge:z ports: - "9000:9000" command: /start-docs diff --git a/containers/compose.production.yml b/containers/compose.production.yml index 922b9c1..999c8ce 100644 --- a/containers/compose.production.yml +++ b/containers/compose.production.yml @@ -14,7 +14,7 @@ services: image: feedback_linker_production_django volumes: - - production_django_media:/app/growth_plan_linker/media + - production_django_media:/app/growth_forge/media depends_on: - postgres - redis diff --git a/containers/traefik/traefik.yml b/containers/traefik/traefik.yml index 9006654..9d07aa3 100644 --- a/containers/traefik/traefik.yml +++ b/containers/traefik/traefik.yml @@ -28,7 +28,7 @@ certificatesResolvers: http: routers: web-secure-router: - rule: "Host(`https://opensciencelabs.github.io/growth-plan-linker`)" + rule: "Host(`https://opensciencelabs.github.io/growth-forge`)" entryPoints: - web-secure middlewares: @@ -39,7 +39,7 @@ http: certResolver: letsencrypt web-media-router: - rule: "Host(`https://opensciencelabs.github.io/growth-plan-linker`) && PathPrefix(`/media/`)" + rule: "Host(`https://opensciencelabs.github.io/growth-forge`) && PathPrefix(`/media/`)" entryPoints: - web-secure middlewares: diff --git a/docs/api/references.md b/docs/api/references.md index 0397905..0ffbc47 100644 --- a/docs/api/references.md +++ b/docs/api/references.md @@ -1,3 +1,3 @@ # Api references -::: growth_plan_linker +::: growth_forge diff --git a/docs/api/references.rst b/docs/api/references.rst index 6c7429a..419e33c 100644 --- a/docs/api/references.rst +++ b/docs/api/references.rst @@ -1,8 +1,8 @@ API references ============== -.. automodule:: growth_plan_linker +.. automodule:: growth_forge :members: -.. automodule:: growth_plan_linker.growth_plan_linker +.. automodule:: growth_forge.growth_forge :members: diff --git a/docs/contributing.md b/docs/contributing.md index 9fa35bc..aaa8901 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -2,7 +2,7 @@ In order to be able to contribute, it is important that you understand the project layout. This project uses the _src layout_, which means that the package -code is located at `./src/growth_plan_linker`. +code is located at `./src/growth_forge`. For my information, check the official documentation: https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/ @@ -24,7 +24,7 @@ You can contribute in many ways: ### Report Bugs -Report bugs at https://github.com/xmnlab/growth-plan-linker.git/issues. +Report bugs at https://github.com/xmnlab/growth-forge.git/issues. If you are reporting a bug, please include: @@ -44,14 +44,14 @@ and “help wanted” is open to whoever wants to implement it. ### Write Documentation -Growth Plan Linker could always use more documentation, whether as part of the -official Growth Plan Linker docs, in docstrings, or even on the web in blog -posts, articles, and such. +Growth Forge could always use more documentation, whether as part of the +official Growth Forge docs, in docstrings, or even on the web in blog posts, +articles, and such. ### Submit Feedback The best way to send feedback is to file an issue at -https://github.com/xmnlab/growth-plan-linker.git/issues. +https://github.com/xmnlab/growth-forge.git/issues. If you are proposing a feature: @@ -62,21 +62,19 @@ If you are proposing a feature: ## Get Started! -Ready to contribute? Here’s how to set up `growth-plan-linker` for local -development. +Ready to contribute? Here’s how to set up `growth-forge` for local development. -1. Fork the `growth-plan-linker` repo on GitHub. +1. Fork the `growth-forge` repo on GitHub. 2. Clone your fork locally:: - $ git clone git@github.com:your_name_here/growth-plan-linker.git + $ git clone git@github.com:your_name_here/growth-forge.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: - $ mkvirtualenv growth-plan-linker $ cd growth-plan-linker/ $ python setup.py - develop + $ mkvirtualenv growth-forge $ cd growth-forge/ $ python setup.py develop 4. Create a branch for local development:: diff --git a/docs/example.ipynb b/docs/example.ipynb index 8d9682a..ad98994 100644 --- a/docs/example.ipynb +++ b/docs/example.ipynb @@ -4,9 +4,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Growth Plan Linker\n", + "# Growth Forge\n", "\n", - "Growth Plan Linker is Python library that aims to do ...\n", + "Growth Forge is Python library that aims to do ...\n", "\n", "## Getting Started\n", "\n", @@ -21,7 +21,7 @@ "metadata": {}, "outputs": [], "source": [ - "import growth_plan_linker" + "import growth_forge" ] }, { diff --git a/docs/index.md b/docs/index.md index cfbbed5..ac73bac 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,12 +1,12 @@ ![LOGO](/images/logo.png) -# Growth Plan Linker +# Growth Forge The main objective of this platform is to offer a space to handle and organize feedback between two people - License: BSD 3 Clause -- Documentation: https://growth-plan-linker.github.io +- Documentation: https://growth-forge.github.io ## Features diff --git a/docs/installation.md b/docs/installation.md index e1aa04c..04e1c9a 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -2,14 +2,14 @@ ## Stable release -To install Growth Plan Linker, run this command in your terminal: +To install Growth Forge, run this command in your terminal: ```bash -$ pip install growth-plan-linker +$ pip install growth-forge ``` -This is the preferred method to install Growth Plan Linker, as it will always -install the most recent stable release. +This is the preferred method to install Growth Forge, as it will always install +the most recent stable release. If you don't have [pip](https://pip.pypa.io) installed, this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) @@ -17,20 +17,20 @@ can guide you through the process. ## From sources -The sources for Growth Plan Linker can be downloaded from the -[Github repo](https://github.com/xmnlab/growth-plan-linker.git). +The sources for Growth Forge can be downloaded from the +[Github repo](https://github.com/xmnlab/growth-forge.git). You can either clone the public repository: ```bash -$ git clone https://github.com/xmnlab/growth-plan-linker.git +$ git clone https://github.com/xmnlab/growth-forge.git ``` Or download the -[tarball](https://github.com/xmnlab/growth-plan-linker.git/tarball/main): +[tarball](https://github.com/xmnlab/growth-forge.git/tarball/main): ```bash -$ curl -OJL https://github.com/xmnlab/growth-plan-linker.git/tarball/main +$ curl -OJL https://github.com/xmnlab/growth-forge.git/tarball/main ``` Once you have a copy of the source, you can install it with: diff --git a/mkdocs.yaml b/mkdocs.yaml index b51206d..5f1a2e8 100644 --- a/mkdocs.yaml +++ b/mkdocs.yaml @@ -1,6 +1,6 @@ -site_name: Growth Plan Linker -site_url: https://opensciencelabs.github.io/growth-plan-linker -repo_url: https://github.com/xmnlab/growth-plan-linker.git +site_name: Growth Forge +site_url: https://opensciencelabs.github.io/growth-forge +repo_url: https://github.com/xmnlab/growth-forge.git docs_dir: ./docs site_dir: ./build # extra_css: @@ -123,7 +123,7 @@ markdown_extensions: - tables - toc extra: - project_name: "Growth Plan Linker" + project_name: "Growth Forge" team: - name: "Active maintainers" members: @@ -135,11 +135,11 @@ extra: - icon: fontawesome/brands/twitter link: https://twitter.com/xmnlab - icon: fontawesome/brands/github - link: https://github.com/xmnlab/growth-plan-linker.git + link: https://github.com/xmnlab/growth-forge.git support_levels: supported: icon: :material-check-decagram:{ .verified } - description: Tested in CI. If this doesn't work for you, please [file an issue](https://github.com/xmnlab/growth-plan-linker.git/issues/new). + description: Tested in CI. If this doesn't work for you, please [file an issue](https://github.com/xmnlab/growth-forge.git/issues/new). bug: icon: :material-bug:{ .bug } description: Should work but doesn't because upstream is broken. Supported on a best-effort basis. @@ -147,4 +147,4 @@ extra: icon: :material-cancel:{ .cancel } description: Unlikely to ever be supported or no upstream support. -copyright: "Copyright © 2022, Growth Plan Linker Team" +copyright: "Copyright © 2022, Growth Forge Team" diff --git a/poetry.lock b/poetry.lock index 872cde1..9eee87e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -888,6 +888,21 @@ files = [ [package.dependencies] Django = ">=3.2" +[[package]] +name = "django-form-surveys" +version = "2.0.4" +description = "A simple Django app to conduct Web-based survey" +optional = false +python-versions = ">=3.6" +files = [ + {file = "django-form-surveys-2.0.4.tar.gz", hash = "sha256:67f4214ea9a59c63afbaa52edd3da1c744a968eaba48bd2bfb20fb2473812e4b"}, + {file = "django_form_surveys-2.0.4-py3-none-any.whl", hash = "sha256:ea34ad9842c16bccd0e62a931f77c5bd1216c52bbff994d3be6f1d34e1f15f8a"}, +] + +[package.dependencies] +django = ">=2.2" +pytz = "*" + [[package]] name = "django-model-utils" version = "4.4.0" @@ -4564,4 +4579,4 @@ test = ["coverage (>=5.3.1)", "prompt-toolkit (>=3.0.29)", "pygments (>=2.2)", " [metadata] lock-version = "2.0" python-versions = ">=3.10,<4" -content-hash = "591ae737f1ada112a23e0c6ed8b87e766d54dca113d81e56fa12740affdaa363" +content-hash = "4a4cebd8bfe164094b1c9874a2693f2a5504669b57535f7a55dd03d6477eda3f" diff --git a/pyproject.toml b/pyproject.toml index 77e57d5..91e6898 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "growth-plan-linker" +name = "growth-forge" version = "0.1.0" # semantic-release description = "The main objective of this platform is to offer a space to handle and organize feedback between two people" authors = ["Ivan Ogasawara "] @@ -8,7 +8,7 @@ exclude = [ ".git/*", ".env*", ] -include = ["src/growth_plan_linker/py.typed"] +include = ["src/growth_forge/py.typed"] [tool.poetry.dependencies] python = ">=3.10,<4" @@ -35,6 +35,7 @@ drf-spectacular = ">=0.27.1" # https://github.com/tfranzel/drf-spectacular gunicorn = ">=21.2.0" # https://github.com/benoitc/gunicorn psycopg = {version = ">=3.1.18", extras = ["binary"]} # https://github.com/psycopg/psycopg sentry-sdk = ">=1.40.4" # https://github.com/getsentry/sentry-python +django-form-surveys = ">=2.0.4" [tool.poetry.dev-dependencies] @@ -100,7 +101,7 @@ python_files = [ # ==== Coverage ==== [tool.coverage.run] -include = ["src/growth_plan_linker/**"] +include = ["src/growth_forge/**"] omit = ["*/migrations/*", "*/tests/*"] plugins = ["django_coverage_plugin"] @@ -114,7 +115,7 @@ ignore_missing_imports = true warn_unused_ignores = true warn_redundant_casts = true warn_unused_configs = true -files = ["./src/growth_plan_linker"] +files = ["./src/growth_forge"] plugins = [ "mypy_django_plugin.main", "mypy_drf_plugin.main", @@ -125,13 +126,18 @@ plugins = [ module = "*.migrations.*" ignore_errors = true +[[tool.mypy.overrides]] +module = "NewSemanalDjangoPlugin" +ignore_errors = true + +# ==== djLint ==== [tool.django-stubs] django_settings_module = "config.settings.test" strict_settings = false ignore_missing_model_attributes = true # [[tool.mypy.overrides]] -# module = "growth_plan_linker.forms" +# module = "growth_forge.forms" # ignore_errors = true [[tool.mypy.overrides]] diff --git a/src/config/api_router.py b/src/config/api_router.py index 623cb3a..42df163 100644 --- a/src/config/api_router.py +++ b/src/config/api_router.py @@ -1,5 +1,5 @@ from django.conf import settings -from growth_plan_linker.users.api.views import UserViewSet +from growth_forge.users.api.views import UserViewSet from rest_framework.routers import DefaultRouter, SimpleRouter router = DefaultRouter() if settings.DEBUG else SimpleRouter() diff --git a/src/config/asgi.py b/src/config/asgi.py index 982366f..6646236 100644 --- a/src/config/asgi.py +++ b/src/config/asgi.py @@ -1,6 +1,6 @@ # ruff: noqa """ -ASGI config for Growth-Plan-Linker project. +ASGI config for GrowthForge project. It exposes the ASGI callable as a module-level variable named ``application``. @@ -16,9 +16,9 @@ from django.core.asgi import get_asgi_application # This allows easy placement of apps within the interior -# growth_plan_linker directory. +# growth_forge directory. BASE_DIR = Path(__file__).resolve(strict=True).parent.parent -sys.path.append(str(BASE_DIR / 'growth_plan_linker')) +sys.path.append(str(BASE_DIR / 'growth_forge')) # If DJANGO_SETTINGS_MODULE is unset, default to the local settings os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.dev') diff --git a/src/config/settings/base.py b/src/config/settings/base.py index 4725433..9b2c16c 100644 --- a/src/config/settings/base.py +++ b/src/config/settings/base.py @@ -6,8 +6,8 @@ import environ BASE_DIR = Path(__file__).resolve(strict=True).parent.parent.parent -# growth_plan_linker/ -APPS_DIR = BASE_DIR / 'growth_plan_linker' +# growth_forge/ +APPS_DIR = BASE_DIR / 'growth_forge' env = environ.Env() READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False) @@ -87,13 +87,14 @@ 'rest_framework.authtoken', 'corsheaders', 'drf_spectacular', + 'djf_surveys', ] LOCAL_APPS = [ - 'growth_plan_linker.users', - 'growth_plan_linker', + 'growth_forge.users', + 'growth_forge', 'projects.apps.ProjectsConfig', - 'linker.apps.LinkerConfig', + 'one_on_one.apps.LinkerConfig', 'growth_plan.apps.GrowthPlanConfig', ] # https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps @@ -102,7 +103,7 @@ # MIGRATIONS # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#migration-modules -MIGRATION_MODULES = {'sites': 'growth_plan_linker.contrib.sites.migrations'} +MIGRATION_MODULES = {'sites': 'growth_forge.contrib.sites.migrations'} # AUTHENTICATION # ------------------------------------------------------------------------------ @@ -202,7 +203,8 @@ 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages', - 'growth_plan_linker.users.context_processors.allauth_settings', + 'djf_surveys.context_processors.surveys_context', + 'growth_forge.users.context_processors.allauth_settings', ], }, }, @@ -215,6 +217,10 @@ CRISPY_TEMPLATE_PACK = 'bootstrap5' CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap5' +# DATE + +DATE_INPUT_FORMATS = ['%Y-%m-%d'] + # FIXTURES # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#fixture-dirs @@ -295,16 +301,14 @@ # https://docs.allauth.org/en/latest/account/configuration.html ACCOUNT_EMAIL_VERIFICATION = 'mandatory' # https://docs.allauth.org/en/latest/account/configuration.html -ACCOUNT_ADAPTER = 'growth_plan_linker.users.adapters.AccountAdapter' +ACCOUNT_ADAPTER = 'growth_forge.users.adapters.AccountAdapter' # https://docs.allauth.org/en/latest/account/forms.html -ACCOUNT_FORMS = {'signup': 'growth_plan_linker.users.forms.UserSignupForm'} +ACCOUNT_FORMS = {'signup': 'growth_forge.users.forms.UserSignupForm'} # https://docs.allauth.org/en/latest/socialaccount/configuration.html -SOCIALACCOUNT_ADAPTER = ( - 'growth_plan_linker.users.adapters.SocialAccountAdapter' -) +SOCIALACCOUNT_ADAPTER = 'growth_forge.users.adapters.SocialAccountAdapter' # https://docs.allauth.org/en/latest/socialaccount/configuration.html SOCIALACCOUNT_FORMS = { - 'signup': 'growth_plan_linker.users.forms.UserSocialSignupForm', + 'signup': 'growth_forge.users.forms.UserSocialSignupForm', } # django-compressor # ------------------------------------------------------------------------------ @@ -331,8 +335,8 @@ # By Default swagger ui is available only to admin user(s). You can change permission classes to change that # See more configuration options at https://drf-spectacular.readthedocs.io/en/latest/settings.html#settings SPECTACULAR_SETTINGS = { - 'TITLE': 'Growth-Plan-Linker API', - 'DESCRIPTION': 'Documentation of API endpoints of Growth-Plan-Linker', + 'TITLE': 'GrowthForge API', + 'DESCRIPTION': 'Documentation of API endpoints of GrowthForge', 'VERSION': '1.0.0', 'SERVE_PERMISSIONS': ['rest_framework.permissions.IsAdminUser'], } diff --git a/src/config/settings/production.py b/src/config/settings/production.py index 9286db0..a6813ad 100644 --- a/src/config/settings/production.py +++ b/src/config/settings/production.py @@ -23,7 +23,7 @@ # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED_HOSTS = env.list( 'DJANGO_ALLOWED_HOSTS', - default=['https://opensciencelabs.github.io/growth-plan-linker'], + default=['https://opensciencelabs.github.io/growth-forge'], ) # DATABASES @@ -88,14 +88,14 @@ # https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email DEFAULT_FROM_EMAIL = env( 'DJANGO_DEFAULT_FROM_EMAIL', - default='Growth-Plan-Linker ', + default='GrowthForge ', ) # https://docs.djangoproject.com/en/dev/ref/settings/#server-email SERVER_EMAIL = env('DJANGO_SERVER_EMAIL', default=DEFAULT_FROM_EMAIL) # https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix EMAIL_SUBJECT_PREFIX = env( 'DJANGO_EMAIL_SUBJECT_PREFIX', - default='[Growth-Plan-Linker] ', + default='[GrowthForge] ', ) # ADMIN @@ -198,7 +198,7 @@ # Tools that generate code samples can use SERVERS to point to the correct domain SPECTACULAR_SETTINGS['SERVERS'] = [ { - 'url': 'https://https://opensciencelabs.github.io/growth-plan-linker', + 'url': 'https://https://opensciencelabs.github.io/growth-forge', 'description': 'Production server', }, ] diff --git a/src/config/urls.py b/src/config/urls.py index 5a6849e..ebd6977 100644 --- a/src/config/urls.py +++ b/src/config/urls.py @@ -11,11 +11,10 @@ from drf_spectacular.views import SpectacularSwaggerView from rest_framework.authtoken.views import obtain_auth_token -from growth_plan_linker.urls import ( +from growth_forge.urls import ( urlpatterns as urlpatterns_growth_plan_linker, ) - urlpatterns = [ path( '', TemplateView.as_view(template_name='pages/home.html'), name='home' @@ -28,12 +27,12 @@ # Django Admin, use {% url 'admin:index' %} path(settings.ADMIN_URL, admin.site.urls), # User management - path( - 'users/', include('growth_plan_linker.users.urls', namespace='users') - ), + path('users/', include('growth_forge.users.urls', namespace='users')), path('accounts/', include('allauth.urls')), - # Your stuff: custom urls includes go here - # ... + # 3rd-party + path( + 'surveys/', include('djf_surveys.urls') + ), # it needs admin permissions # Media files *static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT), ] + urlpatterns_growth_plan_linker diff --git a/src/config/wsgi.py b/src/config/wsgi.py index d8be001..95ee996 100644 --- a/src/config/wsgi.py +++ b/src/config/wsgi.py @@ -1,6 +1,6 @@ # ruff: noqa """ -WSGI config for Growth-Plan-Linker project. +WSGI config for GrowthForge project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable @@ -22,9 +22,9 @@ from django.core.wsgi import get_wsgi_application # This allows easy placement of apps within the interior -# growth_plan_linker directory. +# growth_forge directory. BASE_DIR = Path(__file__).resolve(strict=True).parent.parent -sys.path.append(str(BASE_DIR / 'growth_plan_linker')) +sys.path.append(str(BASE_DIR / 'growth_forge')) # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks # if running multiple sites in the same mod_wsgi process. To fix this, use # mod_wsgi daemon mode with each site in its own daemon process, or use diff --git a/src/growth_plan_linker/__init__.py b/src/growth_forge/__init__.py similarity index 100% rename from src/growth_plan_linker/__init__.py rename to src/growth_forge/__init__.py diff --git a/src/growth_plan_linker/conftest.py b/src/growth_forge/conftest.py similarity index 56% rename from src/growth_plan_linker/conftest.py rename to src/growth_forge/conftest.py index b90bcff..da9ccdd 100644 --- a/src/growth_plan_linker/conftest.py +++ b/src/growth_forge/conftest.py @@ -1,7 +1,8 @@ import pytest -from growth_plan_linker.users.models import User -from growth_plan_linker.users.tests.factories import UserFactory +from growth_forge.users.models import User +from growth_forge.users.tests.factories import UserFactory +from growth_forge.utils import ignore_vulture_issue @pytest.fixture(autouse=True) @@ -11,4 +12,5 @@ def _media_storage(settings, tmpdir) -> None: # type: ignore @pytest.fixture() def user(db) -> User: # type: ignore + ignore_vulture_issue(db) return UserFactory() diff --git a/src/growth_plan_linker/contrib/__init__.py b/src/growth_forge/contrib/__init__.py similarity index 100% rename from src/growth_plan_linker/contrib/__init__.py rename to src/growth_forge/contrib/__init__.py diff --git a/src/growth_plan_linker/contrib/sites/__init__.py b/src/growth_forge/contrib/sites/__init__.py similarity index 100% rename from src/growth_plan_linker/contrib/sites/__init__.py rename to src/growth_forge/contrib/sites/__init__.py diff --git a/src/growth_plan_linker/contrib/sites/migrations/0001_initial.py b/src/growth_forge/contrib/sites/migrations/0001_initial.py similarity index 100% rename from src/growth_plan_linker/contrib/sites/migrations/0001_initial.py rename to src/growth_forge/contrib/sites/migrations/0001_initial.py diff --git a/src/growth_plan_linker/contrib/sites/migrations/0002_alter_domain_unique.py b/src/growth_forge/contrib/sites/migrations/0002_alter_domain_unique.py similarity index 100% rename from src/growth_plan_linker/contrib/sites/migrations/0002_alter_domain_unique.py rename to src/growth_forge/contrib/sites/migrations/0002_alter_domain_unique.py diff --git a/src/growth_plan_linker/contrib/sites/migrations/0003_set_site_domain_and_name.py b/src/growth_forge/contrib/sites/migrations/0003_set_site_domain_and_name.py similarity index 95% rename from src/growth_plan_linker/contrib/sites/migrations/0003_set_site_domain_and_name.py rename to src/growth_forge/contrib/sites/migrations/0003_set_site_domain_and_name.py index 207e501..29d042a 100644 --- a/src/growth_plan_linker/contrib/sites/migrations/0003_set_site_domain_and_name.py +++ b/src/growth_forge/contrib/sites/migrations/0003_set_site_domain_and_name.py @@ -40,8 +40,8 @@ def update_site_forward(apps, schema_editor): _update_or_create_site_with_sequence( Site, schema_editor.connection, - "https://opensciencelabs.github.io/growth-plan-linker", - "Growth-Plan-Linker", + "https://opensciencelabs.github.io/growth-forge", + "GrowthForge", ) diff --git a/src/growth_plan_linker/contrib/sites/migrations/0004_alter_options_ordering_domain.py b/src/growth_forge/contrib/sites/migrations/0004_alter_options_ordering_domain.py similarity index 100% rename from src/growth_plan_linker/contrib/sites/migrations/0004_alter_options_ordering_domain.py rename to src/growth_forge/contrib/sites/migrations/0004_alter_options_ordering_domain.py diff --git a/src/growth_plan_linker/contrib/sites/migrations/__init__.py b/src/growth_forge/contrib/sites/migrations/__init__.py similarity index 100% rename from src/growth_plan_linker/contrib/sites/migrations/__init__.py rename to src/growth_forge/contrib/sites/migrations/__init__.py diff --git a/src/growth_plan_linker/forms.py b/src/growth_forge/forms.py similarity index 100% rename from src/growth_plan_linker/forms.py rename to src/growth_forge/forms.py diff --git a/src/growth_plan_linker/migrations/0001_initial.py b/src/growth_forge/migrations/0001_initial.py similarity index 94% rename from src/growth_plan_linker/migrations/0001_initial.py rename to src/growth_forge/migrations/0001_initial.py index 0c2e984..8d2ec99 100644 --- a/src/growth_plan_linker/migrations/0001_initial.py +++ b/src/growth_forge/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.0.2 on 2024-02-20 20:34 +# Generated by Django 5.0.2 on 2024-02-22 16:41 import django.db.models.deletion from django.conf import settings diff --git a/src/growth_plan_linker/migrations/__init__.py b/src/growth_forge/migrations/__init__.py similarity index 100% rename from src/growth_plan_linker/migrations/__init__.py rename to src/growth_forge/migrations/__init__.py diff --git a/src/growth_plan_linker/models.py b/src/growth_forge/models.py similarity index 87% rename from src/growth_plan_linker/models.py rename to src/growth_forge/models.py index 00bdcce..a78add3 100644 --- a/src/growth_plan_linker/models.py +++ b/src/growth_forge/models.py @@ -3,6 +3,8 @@ from django.db.models.signals import post_save from django.dispatch import receiver +from growth_forge.utils import ignore_vulture_issue + class Profile(models.Model): user = models.OneToOneField( @@ -11,7 +13,6 @@ class Profile(models.Model): projects = models.ManyToManyField( 'projects.Project', related_name='participants' ) - # Add any additional fields for your Person model here def __str__(self): return self.user.username @@ -19,6 +20,7 @@ def __str__(self): @receiver(post_save, sender=settings.AUTH_USER_MODEL) def create_user_profile(sender, instance, created, **kwargs): + ignore_vulture_issue(sender, created, **kwargs) if created: Profile.objects.create(user=instance) diff --git a/src/growth_plan_linker/static/css/project.css b/src/growth_forge/static/css/project.css similarity index 100% rename from src/growth_plan_linker/static/css/project.css rename to src/growth_forge/static/css/project.css diff --git a/src/growth_plan_linker/static/css/styles.css b/src/growth_forge/static/css/styles.css similarity index 100% rename from src/growth_plan_linker/static/css/styles.css rename to src/growth_forge/static/css/styles.css diff --git a/src/growth_plan_linker/static/fonts/.gitkeep b/src/growth_forge/static/fonts/.gitkeep similarity index 100% rename from src/growth_plan_linker/static/fonts/.gitkeep rename to src/growth_forge/static/fonts/.gitkeep diff --git a/src/growth_plan_linker/static/images/favicons/favicon.ico b/src/growth_forge/static/images/favicons/favicon.ico similarity index 100% rename from src/growth_plan_linker/static/images/favicons/favicon.ico rename to src/growth_forge/static/images/favicons/favicon.ico diff --git a/src/growth_plan_linker/static/images/home/avataaars.svg b/src/growth_forge/static/images/home/avataaars.svg similarity index 100% rename from src/growth_plan_linker/static/images/home/avataaars.svg rename to src/growth_forge/static/images/home/avataaars.svg diff --git a/src/growth_plan_linker/static/images/home/portfolio/cabin.png b/src/growth_forge/static/images/home/portfolio/cabin.png similarity index 100% rename from src/growth_plan_linker/static/images/home/portfolio/cabin.png rename to src/growth_forge/static/images/home/portfolio/cabin.png diff --git a/src/growth_plan_linker/static/images/home/portfolio/cake.png b/src/growth_forge/static/images/home/portfolio/cake.png similarity index 100% rename from src/growth_plan_linker/static/images/home/portfolio/cake.png rename to src/growth_forge/static/images/home/portfolio/cake.png diff --git a/src/growth_plan_linker/static/images/home/portfolio/circus.png b/src/growth_forge/static/images/home/portfolio/circus.png similarity index 100% rename from src/growth_plan_linker/static/images/home/portfolio/circus.png rename to src/growth_forge/static/images/home/portfolio/circus.png diff --git a/src/growth_plan_linker/static/images/home/portfolio/game.png b/src/growth_forge/static/images/home/portfolio/game.png similarity index 100% rename from src/growth_plan_linker/static/images/home/portfolio/game.png rename to src/growth_forge/static/images/home/portfolio/game.png diff --git a/src/growth_plan_linker/static/images/home/portfolio/safe.png b/src/growth_forge/static/images/home/portfolio/safe.png similarity index 100% rename from src/growth_plan_linker/static/images/home/portfolio/safe.png rename to src/growth_forge/static/images/home/portfolio/safe.png diff --git a/src/growth_plan_linker/static/images/home/portfolio/submarine.png b/src/growth_forge/static/images/home/portfolio/submarine.png similarity index 100% rename from src/growth_plan_linker/static/images/home/portfolio/submarine.png rename to src/growth_forge/static/images/home/portfolio/submarine.png diff --git a/src/growth_plan_linker/static/js/project.js b/src/growth_forge/static/js/project.js similarity index 100% rename from src/growth_plan_linker/static/js/project.js rename to src/growth_forge/static/js/project.js diff --git a/src/growth_plan_linker/static/js/scripts.js b/src/growth_forge/static/js/scripts.js similarity index 100% rename from src/growth_plan_linker/static/js/scripts.js rename to src/growth_forge/static/js/scripts.js diff --git a/src/growth_plan_linker/templates/403.html b/src/growth_forge/templates/403.html similarity index 100% rename from src/growth_plan_linker/templates/403.html rename to src/growth_forge/templates/403.html diff --git a/src/growth_plan_linker/templates/403_csrf.html b/src/growth_forge/templates/403_csrf.html similarity index 100% rename from src/growth_plan_linker/templates/403_csrf.html rename to src/growth_forge/templates/403_csrf.html diff --git a/src/growth_plan_linker/templates/404.html b/src/growth_forge/templates/404.html similarity index 100% rename from src/growth_plan_linker/templates/404.html rename to src/growth_forge/templates/404.html diff --git a/src/growth_plan_linker/templates/500.html b/src/growth_forge/templates/500.html similarity index 100% rename from src/growth_plan_linker/templates/500.html rename to src/growth_forge/templates/500.html diff --git a/src/growth_plan_linker/templates/account/account_inactive.html b/src/growth_forge/templates/account/account_inactive.html similarity index 100% rename from src/growth_plan_linker/templates/account/account_inactive.html rename to src/growth_forge/templates/account/account_inactive.html diff --git a/src/growth_plan_linker/templates/account/base.html b/src/growth_forge/templates/account/base.html similarity index 100% rename from src/growth_plan_linker/templates/account/base.html rename to src/growth_forge/templates/account/base.html diff --git a/src/growth_plan_linker/templates/account/email.html b/src/growth_forge/templates/account/email.html similarity index 100% rename from src/growth_plan_linker/templates/account/email.html rename to src/growth_forge/templates/account/email.html diff --git a/src/growth_plan_linker/templates/account/email_confirm.html b/src/growth_forge/templates/account/email_confirm.html similarity index 100% rename from src/growth_plan_linker/templates/account/email_confirm.html rename to src/growth_forge/templates/account/email_confirm.html diff --git a/src/growth_plan_linker/templates/account/login.html b/src/growth_forge/templates/account/login.html similarity index 100% rename from src/growth_plan_linker/templates/account/login.html rename to src/growth_forge/templates/account/login.html diff --git a/src/growth_plan_linker/templates/account/logout.html b/src/growth_forge/templates/account/logout.html similarity index 100% rename from src/growth_plan_linker/templates/account/logout.html rename to src/growth_forge/templates/account/logout.html diff --git a/src/growth_plan_linker/templates/account/password_change.html b/src/growth_forge/templates/account/password_change.html similarity index 100% rename from src/growth_plan_linker/templates/account/password_change.html rename to src/growth_forge/templates/account/password_change.html diff --git a/src/growth_plan_linker/templates/account/password_reset.html b/src/growth_forge/templates/account/password_reset.html similarity index 100% rename from src/growth_plan_linker/templates/account/password_reset.html rename to src/growth_forge/templates/account/password_reset.html diff --git a/src/growth_plan_linker/templates/account/password_reset_done.html b/src/growth_forge/templates/account/password_reset_done.html similarity index 100% rename from src/growth_plan_linker/templates/account/password_reset_done.html rename to src/growth_forge/templates/account/password_reset_done.html diff --git a/src/growth_plan_linker/templates/account/password_reset_from_key.html b/src/growth_forge/templates/account/password_reset_from_key.html similarity index 100% rename from src/growth_plan_linker/templates/account/password_reset_from_key.html rename to src/growth_forge/templates/account/password_reset_from_key.html diff --git a/src/growth_plan_linker/templates/account/password_reset_from_key_done.html b/src/growth_forge/templates/account/password_reset_from_key_done.html similarity index 100% rename from src/growth_plan_linker/templates/account/password_reset_from_key_done.html rename to src/growth_forge/templates/account/password_reset_from_key_done.html diff --git a/src/growth_plan_linker/templates/account/password_set.html b/src/growth_forge/templates/account/password_set.html similarity index 100% rename from src/growth_plan_linker/templates/account/password_set.html rename to src/growth_forge/templates/account/password_set.html diff --git a/src/growth_plan_linker/templates/account/signup.html b/src/growth_forge/templates/account/signup.html similarity index 100% rename from src/growth_plan_linker/templates/account/signup.html rename to src/growth_forge/templates/account/signup.html diff --git a/src/growth_plan_linker/templates/account/signup_closed.html b/src/growth_forge/templates/account/signup_closed.html similarity index 100% rename from src/growth_plan_linker/templates/account/signup_closed.html rename to src/growth_forge/templates/account/signup_closed.html diff --git a/src/growth_plan_linker/templates/account/verification_sent.html b/src/growth_forge/templates/account/verification_sent.html similarity index 100% rename from src/growth_plan_linker/templates/account/verification_sent.html rename to src/growth_forge/templates/account/verification_sent.html diff --git a/src/growth_plan_linker/templates/account/verified_email_required.html b/src/growth_forge/templates/account/verified_email_required.html similarity index 100% rename from src/growth_plan_linker/templates/account/verified_email_required.html rename to src/growth_forge/templates/account/verified_email_required.html diff --git a/src/growth_plan_linker/templates/base.html b/src/growth_forge/templates/base.html similarity index 92% rename from src/growth_plan_linker/templates/base.html rename to src/growth_forge/templates/base.html index 9c1d592..fa1f79b 100644 --- a/src/growth_plan_linker/templates/base.html +++ b/src/growth_forge/templates/base.html @@ -10,7 +10,7 @@ {% block title %} - Growth Plan Linker + GrowthForge {% endblock title %}
Growth Plan Linker + href="{% url 'home' %}">GrowthForge
diff --git a/src/growth_plan_linker/templates/pages/about.html b/src/growth_forge/templates/pages/about.html similarity index 92% rename from src/growth_plan_linker/templates/pages/about.html rename to src/growth_forge/templates/pages/about.html index 2d9ae20..f175273 100644 --- a/src/growth_plan_linker/templates/pages/about.html +++ b/src/growth_forge/templates/pages/about.html @@ -7,7 +7,7 @@

About

- Growth-Plan-Linker is a simplified feedback exchange platform designed to facilitate periodic feedback between individuals within specific projects. It aims to streamline communication and insights sharing, enhancing project collaboration and personal development. + GrowthForge is a simplified feedback exchange platform designed to facilitate periodic feedback between individuals within specific projects. It aims to streamline communication and insights sharing, enhancing project collaboration and personal development.

diff --git a/src/growth_plan_linker/templates/pages/home.html b/src/growth_forge/templates/pages/home.html similarity index 99% rename from src/growth_plan_linker/templates/pages/home.html rename to src/growth_forge/templates/pages/home.html index f970a91..2067d78 100644 --- a/src/growth_plan_linker/templates/pages/home.html +++ b/src/growth_forge/templates/pages/home.html @@ -3,7 +3,7 @@ {% load static i18n compress %} {% block title %} - Growth Plan Linker + Growth Forge {% endblock title %} {% block content %} @@ -12,7 +12,7 @@

- Growth Plan Linker + Growth Forge

@@ -26,7 +26,7 @@

- Growth-Plan-Linker is a simplified feedback exchange platform designed to + GrowthForge is a simplified feedback exchange platform designed to facilitate periodic feedback between individuals within specific projects. It aims to streamline communication and insights sharing, enhancing project collaboration and personal development. diff --git a/src/growth_forge/templates/users/user_detail.html b/src/growth_forge/templates/users/user_detail.html new file mode 100644 index 0000000..b4d438a --- /dev/null +++ b/src/growth_forge/templates/users/user_detail.html @@ -0,0 +1,53 @@ +{% extends "base.html" %} + +{% load static %} + +{% block title %} + GrowthForge +{% endblock title %} + +{% block content %} +
+
+
+

+ {{ object.name }}'s Profile +

+
+
+
+
+
+
+ Profile Information +
+
+

+ Name: {{ object.name }} +

+

+ Email: {{ object.email }} +

+ +
+
+
+ {% if object == request.user %} +
+
+
+ Actions +
+ +
+
+ {% endif %} +
+
+{% endblock content %} diff --git a/src/growth_plan_linker/templates/users/user_form.html b/src/growth_forge/templates/users/user_form.html similarity index 100% rename from src/growth_plan_linker/templates/users/user_form.html rename to src/growth_forge/templates/users/user_form.html diff --git a/src/growth_plan_linker/urls.py b/src/growth_forge/urls.py similarity index 68% rename from src/growth_plan_linker/urls.py rename to src/growth_forge/urls.py index 03be4af..8166d5d 100644 --- a/src/growth_plan_linker/urls.py +++ b/src/growth_forge/urls.py @@ -1,12 +1,10 @@ -from django.contrib import admin from django.urls import include, path from . import views urlpatterns = [ - path('admin/', admin.site.urls), path('register/', views.user_register, name='register'), path('projects/', include('projects.urls')), - path('links/', include('linker.urls')), + path('links/', include('one_on_one.urls')), path('growth-plan/', include('growth_plan.urls')), ] diff --git a/src/growth_plan_linker/users/__init__.py b/src/growth_forge/users/__init__.py similarity index 100% rename from src/growth_plan_linker/users/__init__.py rename to src/growth_forge/users/__init__.py diff --git a/src/growth_plan_linker/users/adapters.py b/src/growth_forge/users/adapters.py similarity index 96% rename from src/growth_plan_linker/users/adapters.py rename to src/growth_forge/users/adapters.py index d5478fb..8943bba 100644 --- a/src/growth_plan_linker/users/adapters.py +++ b/src/growth_forge/users/adapters.py @@ -10,7 +10,7 @@ from allauth.socialaccount.models import SocialLogin from django.http import HttpRequest - from growth_plan_linker.users.models import User + from growth_forge.users.models import User class AccountAdapter(DefaultAccountAdapter): diff --git a/src/growth_plan_linker/users/admin.py b/src/growth_forge/users/admin.py similarity index 97% rename from src/growth_plan_linker/users/admin.py rename to src/growth_forge/users/admin.py index eb66a8f..a5adf47 100644 --- a/src/growth_plan_linker/users/admin.py +++ b/src/growth_forge/users/admin.py @@ -4,7 +4,7 @@ from django.contrib.auth import decorators, get_user_model from django.utils.translation import gettext_lazy as _ -from growth_plan_linker.users.forms import ( +from growth_forge.users.forms import ( UserAdminChangeForm, UserAdminCreationForm, ) diff --git a/src/growth_plan_linker/users/api/__init__.py b/src/growth_forge/users/api/__init__.py similarity index 100% rename from src/growth_plan_linker/users/api/__init__.py rename to src/growth_forge/users/api/__init__.py diff --git a/src/growth_plan_linker/users/api/serializers.py b/src/growth_forge/users/api/serializers.py similarity index 85% rename from src/growth_plan_linker/users/api/serializers.py rename to src/growth_forge/users/api/serializers.py index 45d060d..40a1398 100644 --- a/src/growth_plan_linker/users/api/serializers.py +++ b/src/growth_forge/users/api/serializers.py @@ -1,7 +1,7 @@ from django.contrib.auth import get_user_model from rest_framework import serializers -from growth_plan_linker.users.models import User as UserType +from growth_forge.users.models import User as UserType User = get_user_model() diff --git a/src/growth_plan_linker/users/api/views.py b/src/growth_forge/users/api/views.py similarity index 91% rename from src/growth_plan_linker/users/api/views.py rename to src/growth_forge/users/api/views.py index fa9b692..031311b 100644 --- a/src/growth_plan_linker/users/api/views.py +++ b/src/growth_forge/users/api/views.py @@ -10,6 +10,8 @@ from rest_framework.response import Response from rest_framework.viewsets import GenericViewSet +from growth_forge.utils import ignore_vulture_issue + from .serializers import UserSerializer User = get_user_model() @@ -26,6 +28,7 @@ class UserViewSet( lookup_field = 'pk' def get_queryset(self, *args, **kwargs): + ignore_vulture_issue(*args, **kwargs) assert isinstance(self.request.user.id, int) return self.queryset.filter(id=self.request.user.id) diff --git a/src/growth_plan_linker/users/apps.py b/src/growth_forge/users/apps.py similarity index 69% rename from src/growth_plan_linker/users/apps.py rename to src/growth_forge/users/apps.py index 1b222e0..3fec83a 100644 --- a/src/growth_plan_linker/users/apps.py +++ b/src/growth_forge/users/apps.py @@ -5,9 +5,9 @@ class UsersConfig(AppConfig): - name = 'growth_plan_linker.users' + name = 'growth_forge.users' verbose_name = _('Users') def ready(self): with contextlib.suppress(ImportError): - import growth_plan_linker.users.signals # noqa: F401 + import growth_forge.users.signals # noqa: F401 diff --git a/src/growth_plan_linker/users/context_processors.py b/src/growth_forge/users/context_processors.py similarity index 100% rename from src/growth_plan_linker/users/context_processors.py rename to src/growth_forge/users/context_processors.py diff --git a/src/growth_plan_linker/users/forms.py b/src/growth_forge/users/forms.py similarity index 100% rename from src/growth_plan_linker/users/forms.py rename to src/growth_forge/users/forms.py diff --git a/src/growth_plan_linker/users/managers.py b/src/growth_forge/users/managers.py similarity index 97% rename from src/growth_plan_linker/users/managers.py rename to src/growth_forge/users/managers.py index a0a6746..5d832aa 100644 --- a/src/growth_plan_linker/users/managers.py +++ b/src/growth_forge/users/managers.py @@ -7,7 +7,7 @@ from django.contrib.auth.models import UserManager as DjangoUserManager if TYPE_CHECKING: - from growth_plan_linker.users.models import User + from growth_forge.users.models import User class UserManager(DjangoUserManager['User']): diff --git a/src/growth_plan_linker/users/migrations/0001_initial.py b/src/growth_forge/users/migrations/0001_initial.py similarity index 97% rename from src/growth_plan_linker/users/migrations/0001_initial.py rename to src/growth_forge/users/migrations/0001_initial.py index a0a0316..4b3acb1 100644 --- a/src/growth_plan_linker/users/migrations/0001_initial.py +++ b/src/growth_forge/users/migrations/0001_initial.py @@ -4,7 +4,7 @@ from django.db import migrations from django.db import models -import growth_plan_linker.users.models +import growth_forge.users.models class Migration(migrations.Migration): @@ -106,7 +106,7 @@ class Migration(migrations.Migration): "abstract": False, }, managers=[ - ("objects", growth_plan_linker.users.models.UserManager()), + ("objects", growth_forge.users.models.UserManager()), ], ), ] diff --git a/src/growth_plan_linker/users/migrations/__init__.py b/src/growth_forge/users/migrations/__init__.py similarity index 100% rename from src/growth_plan_linker/users/migrations/__init__.py rename to src/growth_forge/users/migrations/__init__.py diff --git a/src/growth_plan_linker/users/models.py b/src/growth_forge/users/models.py similarity index 90% rename from src/growth_plan_linker/users/models.py rename to src/growth_forge/users/models.py index 046ea5d..51b6c07 100644 --- a/src/growth_plan_linker/users/models.py +++ b/src/growth_forge/users/models.py @@ -5,12 +5,12 @@ from django.urls import reverse from django.utils.translation import gettext_lazy as _ -from growth_plan_linker.users.managers import UserManager +from growth_forge.users.managers import UserManager class User(AbstractUser): """ - Default custom user model for Growth-Plan-Linker. + Default custom user model for GrowthForge. If adding fields that need to be filled at user signup, check forms.SignupForm and forms.SocialSignupForms accordingly. """ diff --git a/src/growth_plan_linker/users/tests/__init__.py b/src/growth_forge/users/tests/__init__.py similarity index 100% rename from src/growth_plan_linker/users/tests/__init__.py rename to src/growth_forge/users/tests/__init__.py diff --git a/src/growth_plan_linker/users/tests/factories.py b/src/growth_forge/users/tests/factories.py similarity index 100% rename from src/growth_plan_linker/users/tests/factories.py rename to src/growth_forge/users/tests/factories.py diff --git a/src/growth_plan_linker/users/tests/test_admin.py b/src/growth_forge/users/tests/test_admin.py similarity index 95% rename from src/growth_plan_linker/users/tests/test_admin.py rename to src/growth_forge/users/tests/test_admin.py index 96726c0..773c607 100644 --- a/src/growth_plan_linker/users/tests/test_admin.py +++ b/src/growth_forge/users/tests/test_admin.py @@ -11,7 +11,7 @@ from django.urls import reverse from pytest_django.asserts import assertRedirects -from growth_plan_linker.users.models import User +from growth_forge.users.models import User class TestUserAdmin: @@ -51,7 +51,7 @@ def test_view_user(self, admin_client) -> None: def _force_allauth(self, settings) -> None: settings.DJANGO_ADMIN_FORCE_ALLAUTH = True # Reload the admin module to apply the setting change - import growth_plan_linker.users.admin as users_admin + import growth_forge.users.admin as users_admin with contextlib.suppress(admin.sites.AlreadyRegistered): reload(users_admin) diff --git a/src/growth_plan_linker/users/tests/test_drf_urls.py b/src/growth_forge/users/tests/test_drf_urls.py similarity index 92% rename from src/growth_plan_linker/users/tests/test_drf_urls.py rename to src/growth_forge/users/tests/test_drf_urls.py index 26fb266..8c669ec 100644 --- a/src/growth_plan_linker/users/tests/test_drf_urls.py +++ b/src/growth_forge/users/tests/test_drf_urls.py @@ -1,6 +1,6 @@ from django.urls import resolve, reverse -from growth_plan_linker.users.models import User +from growth_forge.users.models import User def test_user_detail(user: User) -> None: diff --git a/src/growth_plan_linker/users/tests/test_drf_views.py b/src/growth_forge/users/tests/test_drf_views.py similarity index 89% rename from src/growth_plan_linker/users/tests/test_drf_views.py rename to src/growth_forge/users/tests/test_drf_views.py index e706107..c7ccaeb 100644 --- a/src/growth_plan_linker/users/tests/test_drf_views.py +++ b/src/growth_forge/users/tests/test_drf_views.py @@ -3,8 +3,8 @@ from rest_framework.test import APIRequestFactory -from growth_plan_linker.users.api.views import UserViewSet -from growth_plan_linker.users.models import User +from growth_forge.users.api.views import UserViewSet +from growth_forge.users.models import User class TestUserViewSet: diff --git a/src/growth_plan_linker/users/tests/test_forms.py b/src/growth_forge/users/tests/test_forms.py similarity index 90% rename from src/growth_plan_linker/users/tests/test_forms.py rename to src/growth_forge/users/tests/test_forms.py index d3bd81b..adf480b 100644 --- a/src/growth_plan_linker/users/tests/test_forms.py +++ b/src/growth_forge/users/tests/test_forms.py @@ -2,8 +2,8 @@ from django.utils.translation import gettext_lazy as _ -from growth_plan_linker.users.forms import UserAdminCreationForm -from growth_plan_linker.users.models import User +from growth_forge.users.forms import UserAdminCreationForm +from growth_forge.users.models import User class TestUserAdminCreationForm: diff --git a/src/growth_plan_linker/users/tests/test_managers.py b/src/growth_forge/users/tests/test_managers.py similarity index 97% rename from src/growth_plan_linker/users/tests/test_managers.py rename to src/growth_forge/users/tests/test_managers.py index 5b25588..a9a082d 100644 --- a/src/growth_plan_linker/users/tests/test_managers.py +++ b/src/growth_forge/users/tests/test_managers.py @@ -4,7 +4,7 @@ from django.core.management import call_command -from growth_plan_linker.users.models import User +from growth_forge.users.models import User @pytest.mark.django_db() diff --git a/src/growth_plan_linker/users/tests/test_models.py b/src/growth_forge/users/tests/test_models.py similarity index 68% rename from src/growth_plan_linker/users/tests/test_models.py rename to src/growth_forge/users/tests/test_models.py index 18e88eb..abf4c39 100644 --- a/src/growth_plan_linker/users/tests/test_models.py +++ b/src/growth_forge/users/tests/test_models.py @@ -1,4 +1,4 @@ -from growth_plan_linker.users.models import User +from growth_forge.users.models import User def test_user_get_absolute_url(user: User): diff --git a/src/growth_plan_linker/users/tests/test_swagger.py b/src/growth_forge/users/tests/test_swagger.py similarity index 100% rename from src/growth_plan_linker/users/tests/test_swagger.py rename to src/growth_forge/users/tests/test_swagger.py diff --git a/src/growth_plan_linker/users/tests/test_urls.py b/src/growth_forge/users/tests/test_urls.py similarity index 91% rename from src/growth_plan_linker/users/tests/test_urls.py rename to src/growth_forge/users/tests/test_urls.py index 38ba7ee..d377dfa 100644 --- a/src/growth_plan_linker/users/tests/test_urls.py +++ b/src/growth_forge/users/tests/test_urls.py @@ -1,6 +1,6 @@ from django.urls import resolve, reverse -from growth_plan_linker.users.models import User +from growth_forge.users.models import User def test_detail(user: User) -> None: diff --git a/src/growth_plan_linker/users/tests/test_views.py b/src/growth_forge/users/tests/test_views.py similarity index 93% rename from src/growth_plan_linker/users/tests/test_views.py rename to src/growth_forge/users/tests/test_views.py index e563927..c186b4f 100644 --- a/src/growth_plan_linker/users/tests/test_views.py +++ b/src/growth_forge/users/tests/test_views.py @@ -13,10 +13,10 @@ from django.urls import reverse from django.utils.translation import gettext_lazy as _ -from growth_plan_linker.users.forms import UserAdminChangeForm -from growth_plan_linker.users.models import User -from growth_plan_linker.users.tests.factories import UserFactory -from growth_plan_linker.users.views import ( +from growth_forge.users.forms import UserAdminChangeForm +from growth_forge.users.models import User +from growth_forge.users.tests.factories import UserFactory +from growth_forge.users.views import ( UserRedirectView, UserUpdateView, user_detail_view, diff --git a/src/growth_plan_linker/users/urls.py b/src/growth_forge/users/urls.py similarity index 87% rename from src/growth_plan_linker/users/urls.py rename to src/growth_forge/users/urls.py index 404643a..323b6f6 100644 --- a/src/growth_plan_linker/users/urls.py +++ b/src/growth_forge/users/urls.py @@ -1,6 +1,6 @@ from django.urls import path -from growth_plan_linker.users.views import ( +from growth_forge.users.views import ( user_detail_view, user_redirect_view, user_update_view, diff --git a/src/growth_plan_linker/users/views.py b/src/growth_forge/users/views.py similarity index 100% rename from src/growth_plan_linker/users/views.py rename to src/growth_forge/users/views.py diff --git a/src/growth_plan_linker/views.py b/src/growth_forge/views.py similarity index 100% rename from src/growth_plan_linker/views.py rename to src/growth_forge/views.py diff --git a/src/growth_plan/forms.py b/src/growth_plan/forms.py index 89422e5..51acae7 100644 --- a/src/growth_plan/forms.py +++ b/src/growth_plan/forms.py @@ -1,4 +1,5 @@ from django import forms +from django.conf import settings from .models import GrowthPlanItem @@ -16,13 +17,12 @@ class Meta: widgets = { 'title': forms.TextInput(attrs={'class': 'form-control'}), 'description': forms.Textarea(attrs={'class': 'form-control'}), - # Specify the date format for start_date and end_date fields 'start_date': forms.DateInput( - format='%Y-%m-%d', + format=[settings.DATE_INPUT_FORMATS[0]], attrs={'class': 'form-control', 'type': 'date'}, ), 'end_date': forms.DateInput( - format='%Y-%m-%d', + format=[settings.DATE_INPUT_FORMATS[0]], attrs={'class': 'form-control', 'type': 'date'}, ), 'progress_percentage': forms.NumberInput( diff --git a/src/growth_plan/migrations/0001_initial.py b/src/growth_plan/migrations/0001_initial.py index 3c3dd4a..702c51f 100644 --- a/src/growth_plan/migrations/0001_initial.py +++ b/src/growth_plan/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.0.2 on 2024-02-21 01:59 +# Generated by Django 5.0.2 on 2024-02-22 16:46 import django.db.models.deletion from django.conf import settings diff --git a/src/growth_plan_linker/templates/users/user_detail.html b/src/growth_plan_linker/templates/users/user_detail.html deleted file mode 100644 index 75552fc..0000000 --- a/src/growth_plan_linker/templates/users/user_detail.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "base.html" %} - -{% load static %} - -{% block title %} - User: {{ - object.name }} -{% endblock title %} - -{% block content %} -
-
-
-

- {{ object.name }} -

-
-
- {% if object == request.user %} - -
-
- My Info - E-Mail - -
-
- - {% endif %} -
-{% endblock content %} diff --git a/src/linker/forms.py b/src/linker/forms.py deleted file mode 100644 index ec388ca..0000000 --- a/src/linker/forms.py +++ /dev/null @@ -1,25 +0,0 @@ -from django import forms - -from .models import LINK_PERIODICITY_CHOICES, Link - - -class LinkForm(forms.ModelForm): - class Meta: - model = Link - fields = [ - 'person_one', - 'person_two', - 'supervisor', - 'periodicity', - 'times', - ] - widgets = { - 'person_one': forms.Select(attrs={'class': 'form-control'}), - 'person_two': forms.Select(attrs={'class': 'form-control'}), - 'supervisor': forms.Select(attrs={'class': 'form-control'}), - 'periodicity': forms.Select( - choices=LINK_PERIODICITY_CHOICES, - attrs={'class': 'form-control'}, - ), - 'times': forms.NumberInput(attrs={'class': 'form-control'}), - } diff --git a/src/linker/migrations/0001_initial.py b/src/linker/migrations/0001_initial.py deleted file mode 100644 index 89fc896..0000000 --- a/src/linker/migrations/0001_initial.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 5.0.2 on 2024-02-20 20:35 - -import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='Link', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('periodicity', models.CharField(max_length=50)), - ('times', models.IntegerField()), - ('person_one', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='person_one_links', to=settings.AUTH_USER_MODEL)), - ('person_two', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='person_two_links', to=settings.AUTH_USER_MODEL)), - ('supervisor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='supervised_links', to=settings.AUTH_USER_MODEL)), - ], - ), - ] diff --git a/src/linker/models.py b/src/linker/models.py deleted file mode 100644 index f67b9b7..0000000 --- a/src/linker/models.py +++ /dev/null @@ -1,34 +0,0 @@ -from django.conf import settings -from django.db import models - -LINK_PERIODICITY_CHOICES = ( - ('daily', 'daily'), - ('weekly', 'Weekly'), - ('monthly', 'Monthly'), - ('quarterly', 'Quarterly'), - ('semester', 'Semester'), - ('yearly', 'Yearly'), -) - - -class Link(models.Model): - person_one = models.ForeignKey( - settings.AUTH_USER_MODEL, - on_delete=models.CASCADE, - related_name='person_one_links', - ) - person_two = models.ForeignKey( - settings.AUTH_USER_MODEL, - on_delete=models.CASCADE, - related_name='person_two_links', - ) - supervisor = models.ForeignKey( - settings.AUTH_USER_MODEL, - on_delete=models.CASCADE, - related_name='supervised_links', - ) - periodicity = models.CharField(max_length=50) - times = models.IntegerField() - - def __str__(self): - return f'{self.person_one.username} <-> {self.person_two.username}' diff --git a/src/locale/en_US/LC_MESSAGES/django.po b/src/locale/en_US/LC_MESSAGES/django.po index 65da8dd..85857fc 100644 --- a/src/locale/en_US/LC_MESSAGES/django.po +++ b/src/locale/en_US/LC_MESSAGES/django.po @@ -1,4 +1,4 @@ -# Translations for the Growth-Plan-Linker project +# Translations for the GrowthForge project # Copyright (C) 2024 Ivan Ogasawara # Ivan Ogasawara , 2024. # diff --git a/src/locale/fr_FR/LC_MESSAGES/django.po b/src/locale/fr_FR/LC_MESSAGES/django.po index ea6cebc..663e6da 100644 --- a/src/locale/fr_FR/LC_MESSAGES/django.po +++ b/src/locale/fr_FR/LC_MESSAGES/django.po @@ -1,4 +1,4 @@ -# Translations for the Growth-Plan-Linker project +# Translations for the GrowthForge project # Copyright (C) 2024 Ivan Ogasawara # Ivan Ogasawara , 2024. # @@ -11,56 +11,56 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: growth_plan_linker/templates/account/account_inactive.html:5 -#: growth_plan_linker/templates/account/account_inactive.html:8 +#: growth_forge/templates/account/account_inactive.html:5 +#: growth_forge/templates/account/account_inactive.html:8 msgid "Account Inactive" msgstr "Compte inactif" -#: growth_plan_linker/templates/account/account_inactive.html:10 +#: growth_forge/templates/account/account_inactive.html:10 msgid "This account is inactive." msgstr "Ce compte est inactif." -#: growth_plan_linker/templates/account/email.html:7 +#: growth_forge/templates/account/email.html:7 msgid "Account" msgstr "Compte" -#: growth_plan_linker/templates/account/email.html:10 +#: growth_forge/templates/account/email.html:10 msgid "E-mail Addresses" msgstr "Adresses e-mail" -#: growth_plan_linker/templates/account/email.html:13 +#: growth_forge/templates/account/email.html:13 msgid "The following e-mail addresses are associated with your account:" msgstr "Les adresses e-mail suivantes sont associées à votre compte :" -#: growth_plan_linker/templates/account/email.html:27 +#: growth_forge/templates/account/email.html:27 msgid "Verified" msgstr "Vérifié" -#: growth_plan_linker/templates/account/email.html:29 +#: growth_forge/templates/account/email.html:29 msgid "Unverified" msgstr "Non vérifié" -#: growth_plan_linker/templates/account/email.html:31 +#: growth_forge/templates/account/email.html:31 msgid "Primary" msgstr "Primaire" -#: growth_plan_linker/templates/account/email.html:37 +#: growth_forge/templates/account/email.html:37 msgid "Make Primary" msgstr "Changer Primaire" -#: growth_plan_linker/templates/account/email.html:38 +#: growth_forge/templates/account/email.html:38 msgid "Re-send Verification" msgstr "Renvoyer vérification" -#: growth_plan_linker/templates/account/email.html:39 +#: growth_forge/templates/account/email.html:39 msgid "Remove" msgstr "Supprimer" -#: growth_plan_linker/templates/account/email.html:46 +#: growth_forge/templates/account/email.html:46 msgid "Warning:" msgstr "Avertissement:" -#: growth_plan_linker/templates/account/email.html:46 +#: growth_forge/templates/account/email.html:46 msgid "" "You currently do not have any e-mail address set up. You should really add " "an e-mail address so you can receive notifications, reset your password, etc." @@ -69,24 +69,24 @@ msgstr "" "une adresse e-mail pour reçevoir des notifications, réinitialiser votre mot " "de passe, etc." -#: growth_plan_linker/templates/account/email.html:51 +#: growth_forge/templates/account/email.html:51 msgid "Add E-mail Address" msgstr "Ajouter une adresse e-mail" -#: growth_plan_linker/templates/account/email.html:56 +#: growth_forge/templates/account/email.html:56 msgid "Add E-mail" msgstr "Ajouter e-mail" -#: growth_plan_linker/templates/account/email.html:66 +#: growth_forge/templates/account/email.html:66 msgid "Do you really want to remove the selected e-mail address?" msgstr "Voulez-vous vraiment supprimer l'adresse e-mail sélectionnée ?" -#: growth_plan_linker/templates/account/email_confirm.html:6 -#: growth_plan_linker/templates/account/email_confirm.html:10 +#: growth_forge/templates/account/email_confirm.html:6 +#: growth_forge/templates/account/email_confirm.html:10 msgid "Confirm E-mail Address" msgstr "Confirmez votre adresse email" -#: growth_plan_linker/templates/account/email_confirm.html:16 +#: growth_forge/templates/account/email_confirm.html:16 #, python-format msgid "" "Please confirm that %(email)s is an e-mail " @@ -95,11 +95,11 @@ msgstr "" "Veuillez confirmer que %(email)s est un e-mail " "adresse de l'utilisateur %(user_display)s." -#: growth_plan_linker/templates/account/email_confirm.html:20 +#: growth_forge/templates/account/email_confirm.html:20 msgid "Confirm" msgstr "Confirm" -#: growth_plan_linker/templates/account/email_confirm.html:27 +#: growth_forge/templates/account/email_confirm.html:27 #, python-format msgid "" "This e-mail confirmation link expired or is invalid. Please émettre une nouvelle demande de confirmation " "par e-mail." -#: growth_plan_linker/templates/account/login.html:7 -#: growth_plan_linker/templates/account/login.html:11 -#: growth_plan_linker/templates/account/login.html:56 -#: growth_plan_linker/templates/base.html:72 +#: growth_forge/templates/account/login.html:7 +#: growth_forge/templates/account/login.html:11 +#: growth_forge/templates/account/login.html:56 +#: growth_forge/templates/base.html:72 msgid "Sign In" msgstr "S'identifier" -#: growth_plan_linker/templates/account/login.html:17 +#: growth_forge/templates/account/login.html:17 msgid "Please sign in with one of your existing third party accounts:" msgstr "Veuillez vous connecter avec l'un de vos comptes tiers existants :" -#: growth_plan_linker/templates/account/login.html:19 +#: growth_forge/templates/account/login.html:19 #, python-format msgid "" "Or, sign up for a %(site_name)s account and " @@ -129,11 +129,11 @@ msgstr "" "Ou, créez un compte %(site_name)s et " "connectez-vous ci-dessous :" -#: growth_plan_linker/templates/account/login.html:32 +#: growth_forge/templates/account/login.html:32 msgid "or" msgstr "ou" -#: growth_plan_linker/templates/account/login.html:41 +#: growth_forge/templates/account/login.html:41 #, python-format msgid "" "If you have not created an account yet, then please vous inscrire." -#: growth_plan_linker/templates/account/login.html:55 +#: growth_forge/templates/account/login.html:55 msgid "Forgot Password?" msgstr "Mot de passe oublié?" -#: growth_plan_linker/templates/account/logout.html:5 -#: growth_plan_linker/templates/account/logout.html:8 -#: growth_plan_linker/templates/account/logout.html:17 -#: growth_plan_linker/templates/base.html:61 +#: growth_forge/templates/account/logout.html:5 +#: growth_forge/templates/account/logout.html:8 +#: growth_forge/templates/account/logout.html:17 +#: growth_forge/templates/base.html:61 msgid "Sign Out" msgstr "Se déconnecter" -#: growth_plan_linker/templates/account/logout.html:10 +#: growth_forge/templates/account/logout.html:10 msgid "Are you sure you want to sign out?" msgstr "Êtes-vous certain de vouloir vous déconnecter?" -#: growth_plan_linker/templates/account/password_change.html:6 -#: growth_plan_linker/templates/account/password_change.html:9 -#: growth_plan_linker/templates/account/password_change.html:14 -#: growth_plan_linker/templates/account/password_reset_from_key.html:5 -#: growth_plan_linker/templates/account/password_reset_from_key.html:8 -#: growth_plan_linker/templates/account/password_reset_from_key_done.html:4 -#: growth_plan_linker/templates/account/password_reset_from_key_done.html:7 +#: growth_forge/templates/account/password_change.html:6 +#: growth_forge/templates/account/password_change.html:9 +#: growth_forge/templates/account/password_change.html:14 +#: growth_forge/templates/account/password_reset_from_key.html:5 +#: growth_forge/templates/account/password_reset_from_key.html:8 +#: growth_forge/templates/account/password_reset_from_key_done.html:4 +#: growth_forge/templates/account/password_reset_from_key_done.html:7 msgid "Change Password" msgstr "Changer le mot de passe" -#: growth_plan_linker/templates/account/password_reset.html:7 -#: growth_plan_linker/templates/account/password_reset.html:11 -#: growth_plan_linker/templates/account/password_reset_done.html:6 -#: growth_plan_linker/templates/account/password_reset_done.html:9 +#: growth_forge/templates/account/password_reset.html:7 +#: growth_forge/templates/account/password_reset.html:11 +#: growth_forge/templates/account/password_reset_done.html:6 +#: growth_forge/templates/account/password_reset_done.html:9 msgid "Password Reset" msgstr "Réinitialisation du mot de passe" -#: growth_plan_linker/templates/account/password_reset.html:16 +#: growth_forge/templates/account/password_reset.html:16 msgid "" "Forgotten your password? Enter your e-mail address below, and we'll send you " "an e-mail allowing you to reset it." @@ -182,17 +182,17 @@ msgstr "" "Mot de passe oublié? Entrez votre adresse e-mail ci-dessous, et nous vous " "enverrons un e-mail vous permettant de le réinitialiser." -#: growth_plan_linker/templates/account/password_reset.html:21 +#: growth_forge/templates/account/password_reset.html:21 msgid "Reset My Password" msgstr "Réinitialiser mon mot de passe" -#: growth_plan_linker/templates/account/password_reset.html:24 +#: growth_forge/templates/account/password_reset.html:24 msgid "Please contact us if you have any trouble resetting your password." msgstr "" "Veuillez nous contacter si vous rencontrez des difficultés pour réinitialiser" "votre mot de passe." -#: growth_plan_linker/templates/account/password_reset_done.html:15 +#: growth_forge/templates/account/password_reset_done.html:15 msgid "" "We have sent you an e-mail. Please contact us if you do not receive it " "within a few minutes." @@ -200,11 +200,11 @@ msgstr "" "Nous vous avons envoyé un e-mail. Veuillez nous contacter si vous ne le " "recevez pas d'ici quelques minutes." -#: growth_plan_linker/templates/account/password_reset_from_key.html:8 +#: growth_forge/templates/account/password_reset_from_key.html:8 msgid "Bad Token" msgstr "Token Invalide" -#: growth_plan_linker/templates/account/password_reset_from_key.html:12 +#: growth_forge/templates/account/password_reset_from_key.html:12 #, python-format msgid "" "The password reset link was invalid, possibly because it has already been " @@ -215,55 +215,55 @@ msgstr "" "qu'il a déjà été utilisé. Veuillez faire une " "nouvelle demande de réinitialisation de mot de passe." -#: growth_plan_linker/templates/account/password_reset_from_key.html:18 +#: growth_forge/templates/account/password_reset_from_key.html:18 msgid "change password" msgstr "changer le mot de passe" -#: growth_plan_linker/templates/account/password_reset_from_key.html:21 -#: growth_plan_linker/templates/account/password_reset_from_key_done.html:8 +#: growth_forge/templates/account/password_reset_from_key.html:21 +#: growth_forge/templates/account/password_reset_from_key_done.html:8 msgid "Your password is now changed." msgstr "Votre mot de passe est maintenant modifié." -#: growth_plan_linker/templates/account/password_set.html:6 -#: growth_plan_linker/templates/account/password_set.html:9 -#: growth_plan_linker/templates/account/password_set.html:14 +#: growth_forge/templates/account/password_set.html:6 +#: growth_forge/templates/account/password_set.html:9 +#: growth_forge/templates/account/password_set.html:14 msgid "Set Password" msgstr "Définir le mot de passe" -#: growth_plan_linker/templates/account/signup.html:6 +#: growth_forge/templates/account/signup.html:6 msgid "Signup" msgstr "S'inscrire" -#: growth_plan_linker/templates/account/signup.html:9 -#: growth_plan_linker/templates/account/signup.html:19 -#: growth_plan_linker/templates/base.html:67 +#: growth_forge/templates/account/signup.html:9 +#: growth_forge/templates/account/signup.html:19 +#: growth_forge/templates/base.html:67 msgid "Sign Up" msgstr "S'inscrire" -#: growth_plan_linker/templates/account/signup.html:11 +#: growth_forge/templates/account/signup.html:11 #, python-format msgid "" "Already have an account? Then please sign in." msgstr "" "Vous avez déjà un compte? Alors veuillez vous connecter." -#: growth_plan_linker/templates/account/signup_closed.html:5 -#: growth_plan_linker/templates/account/signup_closed.html:8 +#: growth_forge/templates/account/signup_closed.html:5 +#: growth_forge/templates/account/signup_closed.html:8 msgid "Sign Up Closed" msgstr "Inscriptions closes" -#: growth_plan_linker/templates/account/signup_closed.html:10 +#: growth_forge/templates/account/signup_closed.html:10 msgid "We are sorry, but the sign up is currently closed." msgstr "Désolé, mais l'inscription est actuellement fermée." -#: growth_plan_linker/templates/account/verification_sent.html:5 -#: growth_plan_linker/templates/account/verification_sent.html:8 -#: growth_plan_linker/templates/account/verified_email_required.html:5 -#: growth_plan_linker/templates/account/verified_email_required.html:8 +#: growth_forge/templates/account/verification_sent.html:5 +#: growth_forge/templates/account/verification_sent.html:8 +#: growth_forge/templates/account/verified_email_required.html:5 +#: growth_forge/templates/account/verified_email_required.html:8 msgid "Verify Your E-mail Address" msgstr "Vérifiez votre adresse e-mail" -#: growth_plan_linker/templates/account/verification_sent.html:10 +#: growth_forge/templates/account/verification_sent.html:10 msgid "" "We have sent an e-mail to you for verification. Follow the link provided to " "finalize the signup process. Please contact us if you do not receive it " @@ -272,7 +272,7 @@ msgstr "Nous vous avons envoyé un e-mail pour vérification. Suivez le lien fou "pour finalisez le processus d'inscription. Veuillez nous contacter si vous ne le " "recevez pas d'ici quelques minutes." -#: growth_plan_linker/templates/account/verified_email_required.html:12 +#: growth_forge/templates/account/verified_email_required.html:12 msgid "" "This part of the site requires us to verify that\n" "you are who you claim to be. For this purpose, we require that you\n" @@ -282,7 +282,7 @@ msgstr "" "vous êtes qui vous prétendez être. Nous vous demandons donc de\n" "vérifier la propriété de votre adresse e-mail." -#: growth_plan_linker/templates/account/verified_email_required.html:16 +#: growth_forge/templates/account/verified_email_required.html:16 msgid "" "We have sent an e-mail to you for\n" "verification. Please click on the link inside this e-mail. Please\n" @@ -292,7 +292,7 @@ msgstr "" "vérification. Veuillez cliquer sur le lien contenu dans cet e-mail. Veuillez nous\n" "contacter si vous ne le recevez pas d'ici quelques minutes." -#: growth_plan_linker/templates/account/verified_email_required.html:20 +#: growth_forge/templates/account/verified_email_required.html:20 #, python-format msgid "" "Note: you can still change your e-" @@ -301,35 +301,35 @@ msgstr "" "Remarque : vous pouvez toujours changer votre e-" "adresse e-mail." -#: growth_plan_linker/templates/base.html:57 +#: growth_forge/templates/base.html:57 msgid "My Profile" msgstr "Mon Profil" -#: growth_plan_linker/users/admin.py:17 +#: growth_forge/users/admin.py:17 msgid "Personal info" msgstr "Personal info" -#: growth_plan_linker/users/admin.py:19 +#: growth_forge/users/admin.py:19 msgid "Permissions" msgstr "Permissions" -#: growth_plan_linker/users/admin.py:30 +#: growth_forge/users/admin.py:30 msgid "Important dates" msgstr "Dates importantes" -#: growth_plan_linker/users/apps.py:7 +#: growth_forge/users/apps.py:7 msgid "Users" msgstr "Utilisateurs" -#: growth_plan_linker/users/forms.py:24 -#: growth_plan_linker/users/tests/test_forms.py:36 +#: growth_forge/users/forms.py:24 +#: growth_forge/users/tests/test_forms.py:36 msgid "This username has already been taken." msgstr "Ce nom d'utilisateur est déjà pris." -#: growth_plan_linker/users/models.py:15 +#: growth_forge/users/models.py:15 msgid "Name of User" msgstr "Nom de l'utilisateur" -#: growth_plan_linker/users/views.py:23 +#: growth_forge/users/views.py:23 msgid "Information successfully updated" msgstr "Informations mises à jour avec succès" diff --git a/src/locale/pt_BR/LC_MESSAGES/django.po b/src/locale/pt_BR/LC_MESSAGES/django.po index eea6cd9..646f54a 100644 --- a/src/locale/pt_BR/LC_MESSAGES/django.po +++ b/src/locale/pt_BR/LC_MESSAGES/django.po @@ -1,4 +1,4 @@ -# Translations for the Growth-Plan-Linker project +# Translations for the GrowthForge project # Copyright (C) 2024 Ivan Ogasawara # Ivan Ogasawara , 2024. # @@ -11,56 +11,56 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: growth_plan_linker/templates/account/account_inactive.html:5 -#: growth_plan_linker/templates/account/account_inactive.html:8 +#: growth_forge/templates/account/account_inactive.html:5 +#: growth_forge/templates/account/account_inactive.html:8 msgid "Account Inactive" msgstr "Conta Inativa" -#: growth_plan_linker/templates/account/account_inactive.html:10 +#: growth_forge/templates/account/account_inactive.html:10 msgid "This account is inactive." msgstr "Esta conta está inativa." -#: growth_plan_linker/templates/account/email.html:7 +#: growth_forge/templates/account/email.html:7 msgid "Account" msgstr "Conta" -#: growth_plan_linker/templates/account/email.html:10 +#: growth_forge/templates/account/email.html:10 msgid "E-mail Addresses" msgstr "Endereços de E-mail" -#: growth_plan_linker/templates/account/email.html:13 +#: growth_forge/templates/account/email.html:13 msgid "The following e-mail addresses are associated with your account:" msgstr "Os seguintes endereços de e-mail estão associados à sua conta:" -#: growth_plan_linker/templates/account/email.html:27 +#: growth_forge/templates/account/email.html:27 msgid "Verified" msgstr "Verificado" -#: growth_plan_linker/templates/account/email.html:29 +#: growth_forge/templates/account/email.html:29 msgid "Unverified" msgstr "Não verificado" -#: growth_plan_linker/templates/account/email.html:31 +#: growth_forge/templates/account/email.html:31 msgid "Primary" msgstr "Primário" -#: growth_plan_linker/templates/account/email.html:37 +#: growth_forge/templates/account/email.html:37 msgid "Make Primary" msgstr "Tornar Primário" -#: growth_plan_linker/templates/account/email.html:38 +#: growth_forge/templates/account/email.html:38 msgid "Re-send Verification" msgstr "Reenviar verificação" -#: growth_plan_linker/templates/account/email.html:39 +#: growth_forge/templates/account/email.html:39 msgid "Remove" msgstr "Remover" -#: growth_plan_linker/templates/account/email.html:46 +#: growth_forge/templates/account/email.html:46 msgid "Warning:" msgstr "Aviso:" -#: growth_plan_linker/templates/account/email.html:46 +#: growth_forge/templates/account/email.html:46 msgid "" "You currently do not have any e-mail address set up. You should really add " "an e-mail address so you can receive notifications, reset your password, etc." @@ -69,24 +69,24 @@ msgstr "" "realmente deve adicionar um endereço de e-mail para receber notificações, " "redefinir sua senha etc." -#: growth_plan_linker/templates/account/email.html:51 +#: growth_forge/templates/account/email.html:51 msgid "Add E-mail Address" msgstr "Adicionar Endereço de E-mail" -#: growth_plan_linker/templates/account/email.html:56 +#: growth_forge/templates/account/email.html:56 msgid "Add E-mail" msgstr "Adicionar E-mail" -#: growth_plan_linker/templates/account/email.html:66 +#: growth_forge/templates/account/email.html:66 msgid "Do you really want to remove the selected e-mail address?" msgstr "Você realmente deseja remover o endereço de e-mail selecionado?" -#: growth_plan_linker/templates/account/email_confirm.html:6 -#: growth_plan_linker/templates/account/email_confirm.html:10 +#: growth_forge/templates/account/email_confirm.html:6 +#: growth_forge/templates/account/email_confirm.html:10 msgid "Confirm E-mail Address" msgstr "Confirme o endereço de e-mail" -#: growth_plan_linker/templates/account/email_confirm.html:16 +#: growth_forge/templates/account/email_confirm.html:16 #, python-format msgid "" "Please confirm that %(email)s is an e-mail " @@ -95,11 +95,11 @@ msgstr "" "Confirme se %(email)s é um endereço de " "e-mail do usuário %(user_display)s." -#: growth_plan_linker/templates/account/email_confirm.html:20 +#: growth_forge/templates/account/email_confirm.html:20 msgid "Confirm" msgstr "Confirmar" -#: growth_plan_linker/templates/account/email_confirm.html:27 +#: growth_forge/templates/account/email_confirm.html:27 #, python-format msgid "" "This e-mail confirmation link expired or is invalid. Please emita um novo pedido de confirmação por e-mail." -#: growth_plan_linker/templates/account/login.html:7 -#: growth_plan_linker/templates/account/login.html:11 -#: growth_plan_linker/templates/account/login.html:56 -#: growth_plan_linker/templates/base.html:72 +#: growth_forge/templates/account/login.html:7 +#: growth_forge/templates/account/login.html:11 +#: growth_forge/templates/account/login.html:56 +#: growth_forge/templates/base.html:72 msgid "Sign In" msgstr "Entrar" -#: growth_plan_linker/templates/account/login.html:17 +#: growth_forge/templates/account/login.html:17 msgid "Please sign in with one of your existing third party accounts:" msgstr "Faça login com uma de suas contas de terceiros existentes:" -#: growth_plan_linker/templates/account/login.html:19 +#: growth_forge/templates/account/login.html:19 #, python-format msgid "" "Or, sign up for a %(site_name)s account and " "sign in below:" msgstr "Ou, cadastre-se para uma conta em %(site_name)s e entre abaixo:" -#: growth_plan_linker/templates/account/login.html:32 +#: growth_forge/templates/account/login.html:32 msgid "or" msgstr "ou" -#: growth_plan_linker/templates/account/login.html:41 +#: growth_forge/templates/account/login.html:41 #, python-format msgid "" "If you have not created an account yet, then please registre-se primeiro." -#: growth_plan_linker/templates/account/login.html:55 +#: growth_forge/templates/account/login.html:55 msgid "Forgot Password?" msgstr "Esqueceu sua senha?" -#: growth_plan_linker/templates/account/logout.html:5 -#: growth_plan_linker/templates/account/logout.html:8 -#: growth_plan_linker/templates/account/logout.html:17 -#: growth_plan_linker/templates/base.html:61 +#: growth_forge/templates/account/logout.html:5 +#: growth_forge/templates/account/logout.html:8 +#: growth_forge/templates/account/logout.html:17 +#: growth_forge/templates/base.html:61 msgid "Sign Out" msgstr "Sair" -#: growth_plan_linker/templates/account/logout.html:10 +#: growth_forge/templates/account/logout.html:10 msgid "Are you sure you want to sign out?" msgstr "Você tem certeza que deseja sair?" -#: growth_plan_linker/templates/account/password_change.html:6 -#: growth_plan_linker/templates/account/password_change.html:9 -#: growth_plan_linker/templates/account/password_change.html:14 -#: growth_plan_linker/templates/account/password_reset_from_key.html:5 -#: growth_plan_linker/templates/account/password_reset_from_key.html:8 -#: growth_plan_linker/templates/account/password_reset_from_key_done.html:4 -#: growth_plan_linker/templates/account/password_reset_from_key_done.html:7 +#: growth_forge/templates/account/password_change.html:6 +#: growth_forge/templates/account/password_change.html:9 +#: growth_forge/templates/account/password_change.html:14 +#: growth_forge/templates/account/password_reset_from_key.html:5 +#: growth_forge/templates/account/password_reset_from_key.html:8 +#: growth_forge/templates/account/password_reset_from_key_done.html:4 +#: growth_forge/templates/account/password_reset_from_key_done.html:7 msgid "Change Password" msgstr "Alterar Senha" -#: growth_plan_linker/templates/account/password_reset.html:7 -#: growth_plan_linker/templates/account/password_reset.html:11 -#: growth_plan_linker/templates/account/password_reset_done.html:6 -#: growth_plan_linker/templates/account/password_reset_done.html:9 +#: growth_forge/templates/account/password_reset.html:7 +#: growth_forge/templates/account/password_reset.html:11 +#: growth_forge/templates/account/password_reset_done.html:6 +#: growth_forge/templates/account/password_reset_done.html:9 msgid "Password Reset" msgstr "Redefinição de senha" -#: growth_plan_linker/templates/account/password_reset.html:16 +#: growth_forge/templates/account/password_reset.html:16 msgid "" "Forgotten your password? Enter your e-mail address below, and we'll send you " "an e-mail allowing you to reset it." msgstr "Esqueceu sua senha? Digite seu endereço de e-mail abaixo e enviaremos um e-mail permitindo que você o redefina." -#: growth_plan_linker/templates/account/password_reset.html:21 +#: growth_forge/templates/account/password_reset.html:21 msgid "Reset My Password" msgstr "Redefinir minha senha" -#: growth_plan_linker/templates/account/password_reset.html:24 +#: growth_forge/templates/account/password_reset.html:24 msgid "Please contact us if you have any trouble resetting your password." msgstr "Entre em contato conosco se tiver algum problema para redefinir sua senha." -#: growth_plan_linker/templates/account/password_reset_done.html:15 +#: growth_forge/templates/account/password_reset_done.html:15 msgid "" "We have sent you an e-mail. Please contact us if you do not receive it " "within a few minutes." msgstr "Enviamos um e-mail para você. Entre em contato conosco se você não recebê-lo dentro de alguns minutos." -#: growth_plan_linker/templates/account/password_reset_from_key.html:8 +#: growth_forge/templates/account/password_reset_from_key.html:8 msgid "Bad Token" msgstr "Token Inválido" -#: growth_plan_linker/templates/account/password_reset_from_key.html:12 +#: growth_forge/templates/account/password_reset_from_key.html:12 #, python-format msgid "" "The password reset link was invalid, possibly because it has already been " @@ -202,61 +202,61 @@ msgid "" msgstr "O link de redefinição de senha era inválido, possivelmente porque já foi usado. " "Solicite uma nova redefinição de senha." -#: growth_plan_linker/templates/account/password_reset_from_key.html:18 +#: growth_forge/templates/account/password_reset_from_key.html:18 msgid "change password" msgstr "alterar senha" -#: growth_plan_linker/templates/account/password_reset_from_key.html:21 -#: growth_plan_linker/templates/account/password_reset_from_key_done.html:8 +#: growth_forge/templates/account/password_reset_from_key.html:21 +#: growth_forge/templates/account/password_reset_from_key_done.html:8 msgid "Your password is now changed." msgstr "Sua senha agora foi alterada." -#: growth_plan_linker/templates/account/password_set.html:6 -#: growth_plan_linker/templates/account/password_set.html:9 -#: growth_plan_linker/templates/account/password_set.html:14 +#: growth_forge/templates/account/password_set.html:6 +#: growth_forge/templates/account/password_set.html:9 +#: growth_forge/templates/account/password_set.html:14 msgid "Set Password" msgstr "Definir Senha" -#: growth_plan_linker/templates/account/signup.html:6 +#: growth_forge/templates/account/signup.html:6 msgid "Signup" msgstr "Cadastro" -#: growth_plan_linker/templates/account/signup.html:9 -#: growth_plan_linker/templates/account/signup.html:19 -#: growth_plan_linker/templates/base.html:67 +#: growth_forge/templates/account/signup.html:9 +#: growth_forge/templates/account/signup.html:19 +#: growth_forge/templates/base.html:67 msgid "Sign Up" msgstr "Cadastro" -#: growth_plan_linker/templates/account/signup.html:11 +#: growth_forge/templates/account/signup.html:11 #, python-format msgid "" "Already have an account? Then please sign in." msgstr "já tem uma conta? Então, por favor, faça login." -#: growth_plan_linker/templates/account/signup_closed.html:5 -#: growth_plan_linker/templates/account/signup_closed.html:8 +#: growth_forge/templates/account/signup_closed.html:5 +#: growth_forge/templates/account/signup_closed.html:8 msgid "Sign Up Closed" msgstr "Inscrições encerradas" -#: growth_plan_linker/templates/account/signup_closed.html:10 +#: growth_forge/templates/account/signup_closed.html:10 msgid "We are sorry, but the sign up is currently closed." msgstr "Lamentamos, mas as inscrições estão encerradas no momento." -#: growth_plan_linker/templates/account/verification_sent.html:5 -#: growth_plan_linker/templates/account/verification_sent.html:8 -#: growth_plan_linker/templates/account/verified_email_required.html:5 -#: growth_plan_linker/templates/account/verified_email_required.html:8 +#: growth_forge/templates/account/verification_sent.html:5 +#: growth_forge/templates/account/verification_sent.html:8 +#: growth_forge/templates/account/verified_email_required.html:5 +#: growth_forge/templates/account/verified_email_required.html:8 msgid "Verify Your E-mail Address" msgstr "Verifique seu endereço de e-mail" -#: growth_plan_linker/templates/account/verification_sent.html:10 +#: growth_forge/templates/account/verification_sent.html:10 msgid "" "We have sent an e-mail to you for verification. Follow the link provided to " "finalize the signup process. Please contact us if you do not receive it " "within a few minutes." msgstr "Enviamos um e-mail para você para verificação. Siga o link fornecido para finalizar o processo de inscrição. Entre em contato conosco se você não recebê-lo dentro de alguns minutos." -#: growth_plan_linker/templates/account/verified_email_required.html:12 +#: growth_forge/templates/account/verified_email_required.html:12 msgid "" "This part of the site requires us to verify that\n" "you are who you claim to be. For this purpose, we require that you\n" @@ -265,7 +265,7 @@ msgstr "Esta parte do site exige que verifiquemos se você é quem afirma ser.\n "Para esse fim, exigimos que você verifique a propriedade\n" "do seu endereço de e-mail." -#: growth_plan_linker/templates/account/verified_email_required.html:16 +#: growth_forge/templates/account/verified_email_required.html:16 msgid "" "We have sent an e-mail to you for\n" "verification. Please click on the link inside this e-mail. Please\n" @@ -274,42 +274,42 @@ msgstr "Enviamos um e-mail para você para verificação.\n" "Por favor, clique no link dentro deste e-mail.\n" "Entre em contato conosco se você não recebê-lo dentro de alguns minutos." -#: growth_plan_linker/templates/account/verified_email_required.html:20 +#: growth_forge/templates/account/verified_email_required.html:20 #, python-format msgid "" "Note: you can still change your e-" "mail address." msgstr "Nota: você ainda pode alterar seu endereço de e-mail." -#: growth_plan_linker/templates/base.html:57 +#: growth_forge/templates/base.html:57 msgid "My Profile" msgstr "Meu perfil" -#: growth_plan_linker/users/admin.py:17 +#: growth_forge/users/admin.py:17 msgid "Personal info" msgstr "Informação pessoal" -#: growth_plan_linker/users/admin.py:19 +#: growth_forge/users/admin.py:19 msgid "Permissions" msgstr "Permissões" -#: growth_plan_linker/users/admin.py:30 +#: growth_forge/users/admin.py:30 msgid "Important dates" msgstr "Datas importantes" -#: growth_plan_linker/users/apps.py:7 +#: growth_forge/users/apps.py:7 msgid "Users" msgstr "Usuários" -#: growth_plan_linker/users/forms.py:24 -#: growth_plan_linker/users/tests/test_forms.py:36 +#: growth_forge/users/forms.py:24 +#: growth_forge/users/tests/test_forms.py:36 msgid "This username has already been taken." msgstr "Este nome de usuário já foi usado." -#: growth_plan_linker/users/models.py:15 +#: growth_forge/users/models.py:15 msgid "Name of User" msgstr "Nome do Usuário" -#: growth_plan_linker/users/views.py:23 +#: growth_forge/users/views.py:23 msgid "Information successfully updated" msgstr "Informação atualizada com sucesso" diff --git a/src/manage.py b/src/manage.py index 2ed95f8..427a537 100755 --- a/src/manage.py +++ b/src/manage.py @@ -25,8 +25,8 @@ raise # This allows easy placement of apps within the interior - # growth_plan_linker directory. + # growth_forge directory. current_path = Path(__file__).parent.resolve() - sys.path.append(str(current_path / 'growth_plan_linker')) + sys.path.append(str(current_path / 'growth_forge')) execute_from_command_line(sys.argv) diff --git a/src/linker/__init__.py b/src/one_on_one/__init__.py similarity index 100% rename from src/linker/__init__.py rename to src/one_on_one/__init__.py diff --git a/src/linker/admin.py b/src/one_on_one/admin.py similarity index 100% rename from src/linker/admin.py rename to src/one_on_one/admin.py diff --git a/src/linker/apps.py b/src/one_on_one/apps.py similarity index 83% rename from src/linker/apps.py rename to src/one_on_one/apps.py index 16010ec..317b4bf 100644 --- a/src/linker/apps.py +++ b/src/one_on_one/apps.py @@ -3,4 +3,4 @@ class LinkerConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' - name = 'linker' + name = 'one_on_one' diff --git a/src/one_on_one/forms.py b/src/one_on_one/forms.py new file mode 100644 index 0000000..2b03e49 --- /dev/null +++ b/src/one_on_one/forms.py @@ -0,0 +1,53 @@ +from django import forms +from django.contrib.auth import get_user_model +from djf_surveys.models import Survey + +from .models import LINK_PERIODICITY_CHOICES, Link + +User = get_user_model() + + +class LinkForm(forms.ModelForm): + mentor = forms.ModelChoiceField( + queryset=User.objects.all(), + label='Mentor', + widget=forms.Select(attrs={'class': 'form-select'}), + ) + mentee = forms.ModelChoiceField( + queryset=User.objects.all(), + label='Mentee', + widget=forms.Select(attrs={'class': 'form-select'}), + ) + mentor_survey = forms.ModelChoiceField( + queryset=Survey.objects.all(), + label='Mentor Survey', + required=False, # Making survey selection optional + widget=forms.Select(attrs={'class': 'form-select'}), + ) + mentee_survey = forms.ModelChoiceField( + queryset=Survey.objects.all(), + label='Mentee Survey', + required=False, # Making survey selection optional + widget=forms.Select(attrs={'class': 'form-select'}), + ) + periodicity = forms.ChoiceField( + choices=LINK_PERIODICITY_CHOICES, + label='Periodicity', + widget=forms.Select(attrs={'class': 'form-select'}), + ) + times = forms.IntegerField( + label='Times', + widget=forms.NumberInput(attrs={'class': 'form-control'}), + min_value=1, # Assuming 'times' cannot be less than 1 + ) + + class Meta: + model = Link + fields = [ + 'mentor', + 'mentee', + 'mentor_survey', + 'mentee_survey', + 'periodicity', + 'times', + ] diff --git a/src/one_on_one/migrations/0001_initial.py b/src/one_on_one/migrations/0001_initial.py new file mode 100644 index 0000000..adb9f21 --- /dev/null +++ b/src/one_on_one/migrations/0001_initial.py @@ -0,0 +1,34 @@ +# Generated by Django 5.0.2 on 2024-02-22 17:19 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('djf_surveys', '0011_alter_question_key'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Link', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('periodicity', models.CharField(choices=[('daily', 'daily'), ('weekly', 'Weekly'), ('monthly', 'Monthly'), ('quarterly', 'Quarterly'), ('semester', 'Semester'), ('yearly', 'Yearly')], default='weekly', max_length=50, verbose_name='Periodicity')), + ('times', models.IntegerField()), + ('mentee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mentee_links', to=settings.AUTH_USER_MODEL, verbose_name='Mentee')), + ('mentee_survey', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mentee_surveys', to='djf_surveys.survey', verbose_name='Mentee Survey')), + ('mentor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mentor_links', to=settings.AUTH_USER_MODEL, verbose_name='Mentor')), + ('mentor_survey', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mentor_surveys', to='djf_surveys.survey', verbose_name='Mentor Survey')), + ], + options={ + 'verbose_name': 'Link', + 'verbose_name_plural': 'Links', + }, + ), + ] diff --git a/src/linker/migrations/__init__.py b/src/one_on_one/migrations/__init__.py similarity index 100% rename from src/linker/migrations/__init__.py rename to src/one_on_one/migrations/__init__.py diff --git a/src/one_on_one/models.py b/src/one_on_one/models.py new file mode 100644 index 0000000..49e7c9d --- /dev/null +++ b/src/one_on_one/models.py @@ -0,0 +1,57 @@ +from django.conf import settings +from django.db import models +from djf_surveys.models import Survey + +LINK_PERIODICITY_CHOICES = ( + ('daily', 'daily'), + ('weekly', 'Weekly'), + ('monthly', 'Monthly'), + ('quarterly', 'Quarterly'), + ('semester', 'Semester'), + ('yearly', 'Yearly'), +) + + +class Link(models.Model): + mentor = models.ForeignKey( + settings.AUTH_USER_MODEL, + on_delete=models.CASCADE, + related_name='mentor_links', + verbose_name='Mentor', + ) + mentee = models.ForeignKey( + settings.AUTH_USER_MODEL, + on_delete=models.CASCADE, + related_name='mentee_links', + verbose_name='Mentee', + ) + mentor_survey = models.ForeignKey( + Survey, + on_delete=models.SET_NULL, + related_name='mentor_surveys', + null=True, + blank=True, + verbose_name='Mentor Survey', + ) + mentee_survey = models.ForeignKey( + Survey, + on_delete=models.SET_NULL, + related_name='mentee_surveys', + null=True, + blank=True, + verbose_name='Mentee Survey', + ) + periodicity = models.CharField( + max_length=50, + choices=LINK_PERIODICITY_CHOICES, + default='weekly', # Optional: Set a default value + verbose_name='Periodicity', + ) + times = models.IntegerField() + + class Meta: + verbose_name = 'Link' + verbose_name_plural = 'Links' + + def __str__(self): + return f'{self.person_one.username} <-> {self.person_two.username}' diff --git a/src/one_on_one/templates/link-confirm-delete.html b/src/one_on_one/templates/link-confirm-delete.html new file mode 100644 index 0000000..8b2d171 --- /dev/null +++ b/src/one_on_one/templates/link-confirm-delete.html @@ -0,0 +1,21 @@ +{% extends 'base.html' %} + +{% block content %} +
+

+ Delete Link +

+

+ Are you sure you want to delete the link between {{ object.mentor }} and {{ object.mentee }}? +

+
+ {% csrf_token %} + + Cancel +
+
+{% endblock content %} diff --git a/src/one_on_one/templates/link-form.html b/src/one_on_one/templates/link-form.html new file mode 100644 index 0000000..ac87f04 --- /dev/null +++ b/src/one_on_one/templates/link-form.html @@ -0,0 +1,76 @@ +{% extends 'base.html' %} + +{% block content %} +
+

+ {{ title }} Link +

+
+ {% csrf_token %} +
+ {{ form.mentor.label_tag }} + {{ form.mentor }} + {% for error in form.mentor.errors %} +
+ {{ error }} +
+ {% endfor %} +
+
+ {{ form.mentee.label_tag }} + {{ form.mentee }} + {% for error in form.mentee.errors %} +
+ {{ error }} +
+ {% endfor %} +
+
+ {{ form.mentor_survey.label_tag }} + {{ form.mentor_survey }} + {% for error in form.mentor_survey.errors %} +
+ {{ error }} +
+ {% endfor %} +
+
+ {{ form.mentee_survey.label_tag }} + {{ form.mentee_survey }} + {% for error in form.mentee_survey.errors %} +
+ {{ error }} +
+ {% endfor %} +
+ +
+ {{ form.periodicity.label_tag }} + {{ form.periodicity }} + {% for error in form.periodicity.errors %} +
+ {{ error }} +
+ {% endfor %} +
+ +
+ {{ form.times.label_tag }} + {{ form.times }} + {% for error in form.times.errors %} +
+ {{ error }} +
+ {% endfor %} +
+ + Back to Links +
+
+{% endblock content %} diff --git a/src/one_on_one/templates/link-list.html b/src/one_on_one/templates/link-list.html new file mode 100644 index 0000000..3c06157 --- /dev/null +++ b/src/one_on_one/templates/link-list.html @@ -0,0 +1,38 @@ +{% extends 'base.html' %} + +{% block content %} +
+

+ Links +

+ Add New Link +
+ {% for link in links %} +
+
+
+ Link between {{ link.mentor }} and {{ link.mentee }} +
+
+
+ Mentor Survey: {{ link.mentor_survey }} +
+

+ Mentee Survey: {{ link.mentee_survey }} +

+ Edit + Delete +
+
+
+ {% empty %} +

+ No links found. +

+ {% endfor %} +
+
+{% endblock content %} diff --git a/src/linker/tests.py b/src/one_on_one/tests.py similarity index 100% rename from src/linker/tests.py rename to src/one_on_one/tests.py diff --git a/src/linker/urls.py b/src/one_on_one/urls.py similarity index 68% rename from src/linker/urls.py rename to src/one_on_one/urls.py index bb7d7ae..d688b8f 100644 --- a/src/linker/urls.py +++ b/src/one_on_one/urls.py @@ -5,6 +5,6 @@ urlpatterns = [ path('', LinkListView.as_view(), name='link-list'), path('create/', LinkCreateView.as_view(), name='link-create'), - path('edit//', LinkUpdateView.as_view(), name='link-edit'), - path('delete//', LinkDeleteView.as_view(), name='link-delete'), + path('/edit/', LinkUpdateView.as_view(), name='link-edit'), + path('/delete/', LinkDeleteView.as_view(), name='link-delete'), ] diff --git a/src/linker/views.py b/src/one_on_one/views.py similarity index 79% rename from src/linker/views.py rename to src/one_on_one/views.py index caa775f..1b71ce5 100644 --- a/src/linker/views.py +++ b/src/one_on_one/views.py @@ -1,4 +1,4 @@ -# linker/views.py +# one_on_one/views.py from django.urls import reverse_lazy from django.views.generic import CreateView, DeleteView, ListView, UpdateView @@ -10,20 +10,20 @@ class LinkListView(ListView): model = Link context_object_name = 'links' - template_name = 'linker/link_list.html' + template_name = 'link-list.html' class LinkCreateView(CreateView): model = Link form_class = LinkForm - template_name = 'linker/link_form.html' + template_name = 'link-form.html' success_url = reverse_lazy('link-list') class LinkUpdateView(UpdateView): model = Link form_class = LinkForm - template_name = 'linker/link_form.html' + template_name = 'link-form.html' success_url = reverse_lazy('link-list') def get_context_data(self, **kwargs): @@ -35,5 +35,5 @@ def get_context_data(self, **kwargs): class LinkDeleteView(DeleteView): model = Link - template_name = 'linker/link_confirm_delete.html' + template_name = 'link-confirm-delete.html' success_url = reverse_lazy('link-list') diff --git a/src/projects/migrations/0001_initial.py b/src/projects/migrations/0001_initial.py index 45af04e..ebf6e53 100644 --- a/src/projects/migrations/0001_initial.py +++ b/src/projects/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.0.2 on 2024-02-20 20:34 +# Generated by Django 5.0.2 on 2024-02-22 16:41 from django.conf import settings from django.db import migrations, models @@ -18,7 +18,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), - ('observers', models.ManyToManyField(related_name='supervised_projects', to=settings.AUTH_USER_MODEL)), + ('observers', models.ManyToManyField(related_name='observers_projects', to=settings.AUTH_USER_MODEL)), ], ), ] diff --git a/src/projects/models.py b/src/projects/models.py index ce1cb6b..6a4dcc3 100644 --- a/src/projects/models.py +++ b/src/projects/models.py @@ -6,7 +6,7 @@ class Project(models.Model): name = models.CharField(max_length=100) # Assuming you want to keep a relation to track project observers observers = models.ManyToManyField( - settings.AUTH_USER_MODEL, related_name='supervised_projects' + settings.AUTH_USER_MODEL, related_name='observers_projects' ) def __str__(self): diff --git a/src/projects/templates/form.html b/src/projects/templates/form.html index cef6efc..9854e1e 100644 --- a/src/projects/templates/form.html +++ b/src/projects/templates/form.html @@ -19,6 +19,13 @@

name="name" value="{{ form.name.value|default_if_none:'' }}" required /> + {% if form.name.errors %} + {% for error in form.name.errors %} +
+ {{ error }} +
+ {% endfor %} + {% endif %}