-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial fluent support for backend localization: - Adds starlette_context so we can safely have per-request data - Adds a middleware to read accept-language and load fluent - Adds a `l10n` helper function to localize a given key - Adjusts the health check to return a distinct string between locales (we use this for tests...) - A couple of string -> fluent conversions * Localize emails, add tests for those emails, and fix test pathing issues * Install the package instead of manually installing requirements. * Remove the `if not subscriber` from a load of routes, because we do that in the dependency. Also re-org the exception to a separate file. * Swap some commonly used exceptions for a validation exception class, and l10n-ify api * Refactor exception names and definition flow. And replace a few more in schedule.py * Add a few more exceptions and finish off schedule.py * Update the zoom.py exceptions * Update the health check strings * Remove `DATABASE_SECRETS` which is used for AWS, and add a default database url for docker. * 🔨 fix legacy env var * Revert committing frontend testing stash changes on this pr. * 🌐 add German backend translation --------- Co-authored-by: Andreas Müller <[email protected]>
- Loading branch information
1 parent
7dfff89
commit e3abe71
Showing
58 changed files
with
880 additions
and
363 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
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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
.vscode | ||
__pycache__ | ||
.pytest_cache | ||
dist | ||
*.db | ||
*.ini | ||
*.log | ||
*credentials.json | ||
*.pickle | ||
.env | ||
venv | ||
.idea | ||
.vscode | ||
__pycache__ | ||
.pytest_cache | ||
dist | ||
*.db | ||
*.ini | ||
*.log | ||
*credentials.json | ||
*.pickle | ||
.env | ||
venv | ||
.idea | ||
*.egg-info |
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
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 |
---|---|---|
@@ -1,23 +1,28 @@ | ||
FROM python:3.11-buster | ||
|
||
RUN mkdir app | ||
WORKDIR /app | ||
|
||
ENV PATH="${PATH}:/root/.local/bin" | ||
ENV PYTHONPATH=. | ||
|
||
RUN mkdir scripts | ||
|
||
COPY requirements.txt . | ||
COPY pyproject.toml . | ||
COPY alembic.ini.example alembic.ini | ||
COPY scripts/dev-entry.sh scripts/dev-entry.sh | ||
|
||
# Dev only | ||
COPY .env . | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install . | ||
|
||
EXPOSE 5000 | ||
CMD ["/bin/sh", "./scripts/dev-entry.sh"] | ||
FROM python:3.11-buster | ||
|
||
RUN mkdir app | ||
WORKDIR /app | ||
|
||
ENV PATH="${PATH}:/root/.local/bin" | ||
ENV PYTHONPATH=. | ||
|
||
RUN mkdir scripts | ||
|
||
COPY requirements.txt . | ||
COPY pyproject.toml . | ||
COPY alembic.ini.example alembic.ini | ||
COPY scripts/dev-entry.sh scripts/dev-entry.sh | ||
|
||
# Dev only | ||
COPY .env . | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install .'[deploy]' | ||
|
||
# Add this hack to line it up with our dev environment. | ||
# I'll buy whoever fixes this a coffee. | ||
RUN mkdir src | ||
RUN ln -s /app/appointment src/appointment | ||
|
||
EXPOSE 5000 | ||
CMD ["/bin/sh", "./scripts/dev-entry.sh"] |
Empty file.
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
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
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
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
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
Oops, something went wrong.