generated from ocadotechnology/codeforlife-template-backend
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
133 additions
and
2,263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/Pipfile | ||
/Pipfile.lock | ||
/manage.py | ||
/.devcontainer.json | ||
/.github | ||
/.venv | ||
/.vscode | ||
/.gitignore | ||
/codecov.yml | ||
/*.toml | ||
/*.code-* | ||
/*.md | ||
/scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# https://cloud.google.com/appengine/docs/standard/reference/app-yaml?tab=python | ||
|
||
runtime: REPLACE_IN_PIPELINE | ||
instance_class: F1 | ||
service: REPLACE_IN_PIPELINE | ||
|
||
inbound_services: | ||
- warmup | ||
|
||
env_variables: | ||
DEBUG: "0" | ||
DJANGO_SETTINGS_MODULE: "settings" | ||
SECRET_KEY: "REPLACE_IN_PIPELINE" | ||
SERVICE_NAME: "REPLACE_IN_PIPELINE" | ||
SERVICE_PROTOCOL: "https" | ||
SERVICE_DOMAIN: "codeforlife.education" | ||
SERVICE_PORT: "443" | ||
MAIL_ENABLED: "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
© Ocado Group | ||
Created on 11/04/2024 at 16:51:45(+01:00). | ||
The entrypoint to our app. | ||
https://cloud.google.com/appengine/docs/standard/python3/runtime#application_startup | ||
""" | ||
|
||
import os | ||
|
||
from django.core.wsgi import get_wsgi_application | ||
|
||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") | ||
|
||
app = get_wsgi_application() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[tool.black] | ||
line-length = 80 | ||
extend-exclude = ".*/migrations/.*py" | ||
|
||
[tool.pytest.ini_options] | ||
env = ["DJANGO_SETTINGS_MODULE=settings", "SERVICE_NAME=sso"] | ||
|
||
[tool.mypy] | ||
plugins = ["mypy_django_plugin.main", "mypy_drf_plugin.main"] | ||
check_untyped_defs = true | ||
disable_error_code = ["dict-item"] | ||
mypy_path = "../codeforlife-package-python" | ||
|
||
[tool.django-stubs] | ||
django_settings_module = "settings" | ||
|
||
[tool.pylint.main] | ||
init-hook = "import os; os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')" | ||
disable = ["fixme"] | ||
|
||
[tool.pylint.format] | ||
max-line-length = 80 | ||
|
||
[tool.pylint.MASTER] | ||
ignore-paths = [".*/migrations/.*.py"] | ||
load-plugins = "pylint_django" | ||
django-settings-module = "settings" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
line_length = 80 | ||
skip_glob = ["**/migrations/*.py"] | ||
|
||
[tool.coverage.run] | ||
omit = ["*/test_*.py", "*/*_test.py", "main.py", "manage.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
cd "${BASH_SOURCE%/*}/.." | ||
|
||
wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/backend/hard-install | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
cd "${BASH_SOURCE%/*}/.." | ||
|
||
wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/backend/run | SERVICE_NAME=sso bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
cd "${BASH_SOURCE%/*}/.." | ||
|
||
wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/backend/setup | SERVICE_NAME=sso bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
""" | ||
© Ocado Group | ||
Created on 04/07/2024 at 11:42:00(+01:00). | ||
Django settings for api. | ||
Generated by 'django-admin startproject' using Django 3.2.18. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/3.2/topics/settings/ | ||
For the full list of settings and their values, see | ||
https://docs.djangoproject.com/en/3.2/ref/settings/ | ||
""" | ||
|
||
from pathlib import Path | ||
|
||
# pylint: disable-next=wildcard-import,unused-wildcard-import | ||
from codeforlife.settings import * | ||
|
||
# Build paths inside the project like this: BASE_DIR / 'subdir'. | ||
BASE_DIR = Path(__file__).resolve().parent | ||
|
||
DATABASES = get_databases(BASE_DIR) | ||
STATIC_ROOT = get_static_root(BASE_DIR) |