mirror of https://github.com/snachodog/mybuddy.git
lint: add markdown and yaml to prettier
This commit is contained in:
parent
dda68e0fc3
commit
2d1338a915
|
@ -2,11 +2,11 @@ name: Setup
|
||||||
description: Set up Baby Buddy environment and dependencies.
|
description: Set up Baby Buddy environment and dependencies.
|
||||||
inputs:
|
inputs:
|
||||||
python-version:
|
python-version:
|
||||||
description: 'What Python version to use.'
|
description: "What Python version to use."
|
||||||
required: false
|
required: false
|
||||||
default: '3.x'
|
default: "3.x"
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Install Pipenv
|
- name: Install Pipenv
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -15,8 +15,8 @@ runs:
|
||||||
id: setup-python
|
id: setup-python
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python-version }}
|
python-version: ${{ inputs.python-version }}
|
||||||
cache: 'pipenv'
|
cache: "pipenv"
|
||||||
cache-dependency-path: 'requirements.txt'
|
cache-dependency-path: "requirements.txt"
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: pipenv install --dev
|
run: pipenv install --dev
|
||||||
|
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [ '3.10', '3.11', '3.12' ]
|
python-version: ["3.10", "3.11", "3.12"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
|
@ -71,5 +71,5 @@ jobs:
|
||||||
- name: Push to dokku
|
- name: Push to dokku
|
||||||
uses: dokku/github-action@master
|
uses: dokku/github-action@master
|
||||||
with:
|
with:
|
||||||
git_remote_url: 'ssh://dokku@dokku.baby-buddy.net:22/demo'
|
git_remote_url: "ssh://dokku@dokku.baby-buddy.net:22/demo"
|
||||||
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
|
||||||
|
|
|
@ -7,7 +7,7 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '33 0 * * 3'
|
- cron: "33 0 * * 3"
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
|
@ -19,7 +19,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'javascript', 'python' ]
|
language: ["javascript", "python"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: github/codeql-action/init@v3
|
- uses: github/codeql-action/init@v3
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: "Review app"
|
name: "Review app"
|
||||||
env:
|
env:
|
||||||
DOKKU_GIT_REMOTE_URL: 'ssh://dokku@dokku.baby-buddy.net:22'
|
DOKKU_GIT_REMOTE_URL: "ssh://dokku@dokku.baby-buddy.net:22"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [labeled, unlabeled]
|
types: [labeled, unlabeled]
|
||||||
|
|
|
@ -2,7 +2,4 @@ vendor
|
||||||
**/static
|
**/static
|
||||||
*.html
|
*.html
|
||||||
*.css
|
*.css
|
||||||
*.md
|
|
||||||
*.yaml
|
|
||||||
*.yml
|
|
||||||
*.scss
|
*.scss
|
|
@ -11,7 +11,7 @@
|
||||||
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
|
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
|
||||||
|
|
||||||
A buddy for babies! Helps caregivers track sleep, feedings, diaper changes,
|
A buddy for babies! Helps caregivers track sleep, feedings, diaper changes,
|
||||||
tummy time and more to learn about and predict baby's needs without (*as much*)
|
tummy time and more to learn about and predict baby's needs without (_as much_)
|
||||||
guess work.
|
guess work.
|
||||||
|
|
||||||
![Baby Buddy desktop view](screenshot.png)
|
![Baby Buddy desktop view](screenshot.png)
|
||||||
|
@ -56,7 +56,7 @@ for information about how to create/update translations.
|
||||||
|
|
||||||
:uk: English (U.K.)
|
:uk: English (U.K.)
|
||||||
|
|
||||||
:us: English (U.S.) *(base)*
|
:us: English (U.S.) _(base)_
|
||||||
|
|
||||||
:finland: Finnish
|
:finland: Finnish
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ currently being supported with security updates.
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
|
||||||
Baby Buddy's maintainers recommend huntr.dev as a platform for reporting
|
Baby Buddy's maintainers recommend huntr.dev as a platform for reporting
|
||||||
vulnerabilities. Maintainers will do their best to verify, respond to
|
vulnerabilities. Maintainers will do their best to verify, respond to
|
||||||
and fix issues reported on the platform.
|
and fix issues reported on the platform.
|
||||||
|
|
|
@ -123,7 +123,7 @@ Returns JSON data in the response body in the following format:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `count`: Total number of records (*in the database*, not just the response).
|
- `count`: Total number of records (_in the database_, not just the response).
|
||||||
- `next`: URL for the next set of results.
|
- `next`: URL for the next set of results.
|
||||||
- `previous`: URL for the previous set of results.
|
- `previous`: URL for the previous set of results.
|
||||||
- `results`: An array of the results of the request.
|
- `results`: An array of the results of the request.
|
||||||
|
@ -192,7 +192,7 @@ formats.
|
||||||
`POST` requests also accept a `timer` field to model endpoints supporting duration
|
`POST` requests also accept a `timer` field to model endpoints supporting duration
|
||||||
(Feeding, Sleep, Tummy Time). Set `timer` to a valid timer ID in a request instead of
|
(Feeding, Sleep, Tummy Time). Set `timer` to a valid timer ID in a request instead of
|
||||||
the `start` and `end` fields. The new entry will use the `start` and `end` values
|
the `start` and `end` fields. The new entry will use the `start` and `end` values
|
||||||
*from the Timer* and if the timer is running it will be stopped by this operation.
|
_from the Timer_ and if the timer is running it will be stopped by this operation.
|
||||||
|
|
||||||
Additionally, if the Timer has a child relationship, the `child` field will be
|
Additionally, if the Timer has a child relationship, the `child` field will be
|
||||||
filled in automatically with the `child` value from the Timer.
|
filled in automatically with the `child` value from the Timer.
|
||||||
|
@ -201,7 +201,7 @@ The `timer` field will **always override** the relevant fields (`child`, `start`
|
||||||
and `end`) on the request. E.g., a `POST` request with both the `timer` and `end`
|
and `end`) on the request. E.g., a `POST` request with both the `timer` and `end`
|
||||||
fields will ignore the `end` field value and replace it with the Timer's `end`
|
fields will ignore the `end` field value and replace it with the Timer's `end`
|
||||||
value. The same applies for `start` and `child`. These fields are all **required**
|
value. The same applies for `start` and `child`. These fields are all **required**
|
||||||
if the `timer` field is *not* set.
|
if the `timer` field is _not_ set.
|
||||||
|
|
||||||
#### Example `timer` field usage
|
#### Example `timer` field usage
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
## `DEBUG`
|
## `DEBUG`
|
||||||
|
|
||||||
*Default:* `False`
|
_Default:_ `False`
|
||||||
|
|
||||||
When in debug mode, Baby Buddy will print much more detailed error information
|
When in debug mode, Baby Buddy will print much more detailed error information
|
||||||
for exceptions. This setting should be *False* in production deployments.
|
for exceptions. This setting should be _False_ in production deployments.
|
||||||
|
|
||||||
See also [Django's documentation on the DEBUG setting](https://docs.djangoproject.com/en/5.0/ref/settings/#debug).
|
See also [Django's documentation on the DEBUG setting](https://docs.djangoproject.com/en/5.0/ref/settings/#debug).
|
||||||
|
|
||||||
## `SUB_PATH`
|
## `SUB_PATH`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
If Baby Buddy is hosted in a subdirectory of another server (e.g., `http://www.example.com/babybuddy`)
|
If Baby Buddy is hosted in a subdirectory of another server (e.g., `http://www.example.com/babybuddy`)
|
||||||
this must be set to the subdirectory path (e.g., `/babybuddy`) for correct handling of
|
this must be set to the subdirectory path (e.g., `/babybuddy`) for correct handling of
|
||||||
|
@ -22,7 +22,7 @@ details.
|
||||||
|
|
||||||
## `TIME_ZONE`
|
## `TIME_ZONE`
|
||||||
|
|
||||||
*Default:* `UTC`
|
_Default:_ `UTC`
|
||||||
|
|
||||||
The default time zone to use for the instance. This value can be overridden per use from
|
The default time zone to use for the instance. This value can be overridden per use from
|
||||||
the user settings form.
|
the user settings form.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## `DB_ENGINE`
|
## `DB_ENGINE`
|
||||||
|
|
||||||
*Default:* `django.db.backends.sqlite3`
|
_Default:_ `django.db.backends.sqlite3`
|
||||||
|
|
||||||
The database engine utilized for the deployment.
|
The database engine utilized for the deployment.
|
||||||
|
|
||||||
|
@ -10,37 +10,37 @@ See also [Django's documentation on the ENGINE setting](https://docs.djangoproje
|
||||||
|
|
||||||
## `DB_HOST`
|
## `DB_HOST`
|
||||||
|
|
||||||
*Default:* unset
|
_Default:_ unset
|
||||||
|
|
||||||
The name of the database host for the deployment.
|
The name of the database host for the deployment.
|
||||||
|
|
||||||
## `DB_NAME`
|
## `DB_NAME`
|
||||||
|
|
||||||
*Default:* `BASE_DIR/data/db.sqlite3`
|
_Default:_ `BASE_DIR/data/db.sqlite3`
|
||||||
|
|
||||||
The name of the database table utilized for the deployment.
|
The name of the database table utilized for the deployment.
|
||||||
|
|
||||||
## `DB_PASSWORD`
|
## `DB_PASSWORD`
|
||||||
|
|
||||||
*Default:* unset
|
_Default:_ unset
|
||||||
|
|
||||||
The password for the database user for the deployment. In the default example,
|
The password for the database user for the deployment. In the default example,
|
||||||
this is the root PostgreSQL password.
|
this is the root PostgreSQL password.
|
||||||
|
|
||||||
## `DB_PORT`
|
## `DB_PORT`
|
||||||
|
|
||||||
*Default:* unset
|
_Default:_ unset
|
||||||
|
|
||||||
The listening port for the database. The default port for PostgreSQL is 5432.
|
The listening port for the database. The default port for PostgreSQL is 5432.
|
||||||
|
|
||||||
## `DB_USER`
|
## `DB_USER`
|
||||||
|
|
||||||
*Default:* unset
|
_Default:_ unset
|
||||||
|
|
||||||
The database username utilized for the deployment.
|
The database username utilized for the deployment.
|
||||||
|
|
||||||
## `DB_OPTIONS`
|
## `DB_OPTIONS`
|
||||||
|
|
||||||
*Default:* unset
|
_Default:_ unset
|
||||||
|
|
||||||
Additional options to pass to the database library. See the [Django Databases documentation](https://docs.djangoproject.com/en/5.0/ref/databases/) for examples. To enforce an SSL connection to the database, use `{'sslmode': 'require'}`.
|
Additional options to pass to the database library. See the [Django Databases documentation](https://docs.djangoproject.com/en/5.0/ref/databases/) for examples. To enforce an SSL connection to the database, use `{'sslmode': 'require'}`.
|
||||||
|
|
|
@ -2,51 +2,51 @@
|
||||||
|
|
||||||
## `EMAIL_HOST`
|
## `EMAIL_HOST`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
The host to use for sending email. This must be set to enable SMTP email delivery.
|
The host to use for sending email. This must be set to enable SMTP email delivery.
|
||||||
|
|
||||||
## `EMAIL_HOST_PASSWORD`
|
## `EMAIL_HOST_PASSWORD`
|
||||||
|
|
||||||
*Default:* (empty)
|
_Default:_ (empty)
|
||||||
|
|
||||||
Password to use for the SMTP server defined in `EMAIL_HOST`. This setting is used in
|
Password to use for the SMTP server defined in `EMAIL_HOST`. This setting is used in
|
||||||
conjunction with `EMAIL_HOST_USER` when authenticating to the SMTP server.
|
conjunction with `EMAIL_HOST_USER` when authenticating to the SMTP server.
|
||||||
|
|
||||||
## `EMAIL_HOST_USER`
|
## `EMAIL_HOST_USER`
|
||||||
|
|
||||||
*Default:* (empty)
|
_Default:_ (empty)
|
||||||
|
|
||||||
Username to use for the SMTP server defined in `EMAIL_HOST`.
|
Username to use for the SMTP server defined in `EMAIL_HOST`.
|
||||||
|
|
||||||
## `EMAIL_PORT`
|
## `EMAIL_PORT`
|
||||||
|
|
||||||
*Default:* 25
|
_Default:_ 25
|
||||||
|
|
||||||
Port to use for the SMTP server defined in `EMAIL_HOST`.
|
Port to use for the SMTP server defined in `EMAIL_HOST`.
|
||||||
|
|
||||||
## `EMAIL_USE_TLS`
|
## `EMAIL_USE_TLS`
|
||||||
|
|
||||||
*Default:* `False`
|
_Default:_ `False`
|
||||||
|
|
||||||
Whether to use a TLS (secure) connection when talking to the SMTP server.
|
Whether to use a TLS (secure) connection when talking to the SMTP server.
|
||||||
|
|
||||||
## `EMAIL_USE_SSL`
|
## `EMAIL_USE_SSL`
|
||||||
|
|
||||||
*Default:* `False`
|
_Default:_ `False`
|
||||||
|
|
||||||
Whether to use an implicit TLS (secure) connection when talking to the SMTP server.
|
Whether to use an implicit TLS (secure) connection when talking to the SMTP server.
|
||||||
|
|
||||||
## `EMAIL_SSL_KEYFILE`
|
## `EMAIL_SSL_KEYFILE`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
f `EMAIL_USE_SSL` or `EMAIL_USE_TLS` is `True`, you can optionally specify the path to a
|
f `EMAIL_USE_SSL` or `EMAIL_USE_TLS` is `True`, you can optionally specify the path to a
|
||||||
PEM-formatted certificate chain file to use for the SSL connection.
|
PEM-formatted certificate chain file to use for the SSL connection.
|
||||||
|
|
||||||
## `EMAIL_SSL_CERTFILE`
|
## `EMAIL_SSL_CERTFILE`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
If `EMAIL_USE_SSL` or `EMAIL_USE_TLS` is `True`, you can optionally specify the path to
|
If `EMAIL_USE_SSL` or `EMAIL_USE_TLS` is `True`, you can optionally specify the path to
|
||||||
a PEM-formatted private key file to use for the SSL connection.
|
a PEM-formatted private key file to use for the SSL connection.
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## `ENABLE_HOME_ASSISTANT_SUPPORT`
|
## `ENABLE_HOME_ASSISTANT_SUPPORT`
|
||||||
|
|
||||||
*Default:* `False`
|
_Default:_ `False`
|
||||||
|
|
||||||
This setting should be set to `True` if babybuddy is hosted through the [ingress
|
This setting should be set to `True` if babybuddy is hosted through the [ingress
|
||||||
service of home assistant](https://developers.home-assistant.io/docs/add-ons/presentation/#ingress).
|
service of home assistant](https://developers.home-assistant.io/docs/add-ons/presentation/#ingress).
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
## `ALLOWED_HOSTS`
|
## `ALLOWED_HOSTS`
|
||||||
|
|
||||||
*Default:* `*` (any host)
|
_Default:_ `*` (any host)
|
||||||
|
|
||||||
Set this variable to a single host or comma-separated list of hosts without spaces.
|
Set this variable to a single host or comma-separated list of hosts without spaces.
|
||||||
This should *always* be set to a specific host or hosts in production deployments.
|
This should _always_ be set to a specific host or hosts in production deployments.
|
||||||
|
|
||||||
Do not include schemes ("http" or "https") with this setting.
|
Do not include schemes ("http" or "https") with this setting.
|
||||||
|
|
||||||
|
@ -21,16 +21,17 @@ Do not include schemes ("http" or "https") with this setting.
|
||||||
|
|
||||||
## `CSRF_COOKIE_SECURE`
|
## `CSRF_COOKIE_SECURE`
|
||||||
|
|
||||||
*Default:* `False`
|
_Default:_ `False`
|
||||||
|
|
||||||
If this is set to `True`, the browser CSRF cookie will be marked as "secure", which instructs the browser to only send the cookie over an HTTPS connection (never HTTP).
|
If this is set to `True`, the browser CSRF cookie will be marked as "secure", which instructs the browser to only send the cookie over an HTTPS connection (never HTTP).
|
||||||
|
|
||||||
**See also**
|
**See also**
|
||||||
|
|
||||||
- [Django's documentation on the `CSRF_COOKIE_SECURE` setting](https://docs.djangoproject.com/en/5.0/ref/settings/#csrf-cookie-secure)
|
- [Django's documentation on the `CSRF_COOKIE_SECURE` setting](https://docs.djangoproject.com/en/5.0/ref/settings/#csrf-cookie-secure)
|
||||||
|
|
||||||
## `CSRF_TRUSTED_ORIGINS`
|
## `CSRF_TRUSTED_ORIGINS`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
If Baby Buddy is behind a proxy, you may need add all possible origins to this setting
|
If Baby Buddy is behind a proxy, you may need add all possible origins to this setting
|
||||||
for form submission to work correctly. Separate multiple origins with commas.
|
for form submission to work correctly. Separate multiple origins with commas.
|
||||||
|
@ -49,12 +50,12 @@ Each entry must contain both the scheme (http, https) and fully-qualified domain
|
||||||
|
|
||||||
## `PROXY_HEADER`
|
## `PROXY_HEADER`
|
||||||
|
|
||||||
*Default:* `HTTP_REMOTE_USER`
|
_Default:_ `HTTP_REMOTE_USER`
|
||||||
|
|
||||||
Sets the header to read the authenticated username from when
|
Sets the header to read the authenticated username from when
|
||||||
`REVERSE_PROXY_AUTH` has been enabled.
|
`REVERSE_PROXY_AUTH` has been enabled.
|
||||||
|
|
||||||
Baby Buddy modifies headers in the HTTP request; HTTP headers in the request have all characters converted to uppercase, replacing any hyphens with underscores and adding an HTTP_ prefix to the name. For example `X-Auth-User` would be converted to `HTTP_X_AUTH_USER`.
|
Baby Buddy modifies headers in the HTTP request; HTTP headers in the request have all characters converted to uppercase, replacing any hyphens with underscores and adding an HTTP\_ prefix to the name. For example `X-Auth-User` would be converted to `HTTP_X_AUTH_USER`.
|
||||||
|
|
||||||
**Example value**
|
**Example value**
|
||||||
|
|
||||||
|
@ -62,16 +63,17 @@ Baby Buddy modifies headers in the HTTP request; HTTP headers in the request hav
|
||||||
HTTP_X_AUTH_USER
|
HTTP_X_AUTH_USER
|
||||||
|
|
||||||
**See also**
|
**See also**
|
||||||
|
|
||||||
- [Django's documentation on the `REMOTE_USER` authentication method](https://docs.djangoproject.com/en/5.0/howto/auth-remote-user/)
|
- [Django's documentation on the `REMOTE_USER` authentication method](https://docs.djangoproject.com/en/5.0/howto/auth-remote-user/)
|
||||||
- [Django's documentation on the request.META object](https://docs.djangoproject.com/en/5.0/ref/request-response/#django.http.HttpRequest.META)
|
- [Django's documentation on the request.META object](https://docs.djangoproject.com/en/5.0/ref/request-response/#django.http.HttpRequest.META)
|
||||||
- [`REVERSE_PROXY_AUTH`](#reverse_proxy_auth)
|
- [`REVERSE_PROXY_AUTH`](#reverse_proxy_auth)
|
||||||
|
|
||||||
## `REVERSE_PROXY_AUTH`
|
## `REVERSE_PROXY_AUTH`
|
||||||
|
|
||||||
*Default:* `False`
|
_Default:_ `False`
|
||||||
|
|
||||||
Enable use of `PROXY_HEADER` to pass the username of an authenticated user.
|
Enable use of `PROXY_HEADER` to pass the username of an authenticated user.
|
||||||
This setting should *only* be used with a properly configured reverse proxy to
|
This setting should _only_ be used with a properly configured reverse proxy to
|
||||||
ensure the headers are not forwarded from sources other than your proxy.
|
ensure the headers are not forwarded from sources other than your proxy.
|
||||||
|
|
||||||
**See also**
|
**See also**
|
||||||
|
@ -80,7 +82,7 @@ ensure the headers are not forwarded from sources other than your proxy.
|
||||||
|
|
||||||
## `SECRET_KEY`
|
## `SECRET_KEY`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
A random, unique string must be set as the "secret key" before Baby Buddy can
|
A random, unique string must be set as the "secret key" before Baby Buddy can
|
||||||
be deployed and run.
|
be deployed and run.
|
||||||
|
@ -89,7 +91,7 @@ See also [Django's documentation on the SECRET_KEY setting](https://docs.djangop
|
||||||
|
|
||||||
## `SECURE_PROXY_SSL_HEADER`
|
## `SECURE_PROXY_SSL_HEADER`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
If Baby Buddy is behind a proxy, you may need to set this to `True` in order to
|
If Baby Buddy is behind a proxy, you may need to set this to `True` in order to
|
||||||
trust the `X-Forwarded-Proto` header that comes from your proxy, and any time
|
trust the `X-Forwarded-Proto` header that comes from your proxy, and any time
|
||||||
|
@ -104,9 +106,10 @@ came in via HTTPS).
|
||||||
|
|
||||||
## `SESSION_COOKIE_SECURE`
|
## `SESSION_COOKIE_SECURE`
|
||||||
|
|
||||||
*Default:* `False`
|
_Default:_ `False`
|
||||||
|
|
||||||
If this is set to `True`, the browser session cookie will be marked as "secure", which instructs the browser to only send the cookie over an HTTPS connection (never HTTP).
|
If this is set to `True`, the browser session cookie will be marked as "secure", which instructs the browser to only send the cookie over an HTTPS connection (never HTTP).
|
||||||
|
|
||||||
**See also**
|
**See also**
|
||||||
|
|
||||||
- [Django's documentation on the `SESSION_COOKIE_SECURE` setting](https://docs.djangoproject.com/en/5.0/ref/settings/#session-cookie-secure)
|
- [Django's documentation on the `SESSION_COOKIE_SECURE` setting](https://docs.djangoproject.com/en/5.0/ref/settings/#session-cookie-secure)
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
## `ALLOW_UPLOADS`
|
## `ALLOW_UPLOADS`
|
||||||
|
|
||||||
*Default:* `True`
|
_Default:_ `True`
|
||||||
|
|
||||||
Whether to allow uploads (e.g., of Child photos).
|
Whether to allow uploads (e.g., of Child photos).
|
||||||
|
|
||||||
## `AWS_ACCESS_KEY_ID`
|
## `AWS_ACCESS_KEY_ID`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
Required to access your AWS S3 bucket, should be uniquely generated per bucket
|
Required to access your AWS S3 bucket, should be uniquely generated per bucket
|
||||||
for security.
|
for security.
|
||||||
|
@ -17,7 +17,7 @@ See also: [`AWS_STORAGE_BUCKET_NAME`](#aws_storage_bucket_name)
|
||||||
|
|
||||||
## `AWS_SECRET_ACCESS_KEY`
|
## `AWS_SECRET_ACCESS_KEY`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
Required to access your AWS S3 bucket, should be uniquely generated per bucket
|
Required to access your AWS S3 bucket, should be uniquely generated per bucket
|
||||||
for security.
|
for security.
|
||||||
|
@ -26,14 +26,14 @@ See also: [`AWS_STORAGE_BUCKET_NAME`](#aws_storage_bucket_name)
|
||||||
|
|
||||||
## `AWS_STORAGE_BUCKET_NAME`
|
## `AWS_STORAGE_BUCKET_NAME`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
If you would like to use AWS S3 for storage you will need to create a bucket and add
|
If you would like to use AWS S3 for storage you will need to create a bucket and add
|
||||||
its name. See django-storages' [Amazon S3 documentation](https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html).
|
its name. See django-storages' [Amazon S3 documentation](https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html).
|
||||||
|
|
||||||
## `AWS_S3_ENDPOINT_URL`
|
## `AWS_S3_ENDPOINT_URL`
|
||||||
|
|
||||||
*Default:* `None`
|
_Default:_ `None`
|
||||||
|
|
||||||
Custom URL to use when connecting to S3, including scheme.
|
Custom URL to use when connecting to S3, including scheme.
|
||||||
This allows to use a S3-compatible storage service of another provider than AWS.
|
This allows to use a S3-compatible storage service of another provider than AWS.
|
||||||
|
|
|
@ -90,9 +90,11 @@ username and password (`admin`/`admin`).
|
||||||
Devenv also generates the **.devcontainer for vscode**, and sets up **github codespaces support**. To run babybuddy in the devcontainer or codespaces, open a terminal after opening this repo in the devcontainer, which causes the dependencies to be installed via `devenv shell`. Then, run `gulp` to start the baby buddy server.
|
Devenv also generates the **.devcontainer for vscode**, and sets up **github codespaces support**. To run babybuddy in the devcontainer or codespaces, open a terminal after opening this repo in the devcontainer, which causes the dependencies to be installed via `devenv shell`. Then, run `gulp` to start the baby buddy server.
|
||||||
|
|
||||||
### Debugging in devenv + vscode
|
### Debugging in devenv + vscode
|
||||||
|
|
||||||
To debug in devenv + vscode/codespaces:
|
To debug in devenv + vscode/codespaces:
|
||||||
|
|
||||||
1. add a `.vscode/launch.json` file like this:
|
1. add a `.vscode/launch.json` file like this:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
@ -108,14 +110,13 @@ To debug in devenv + vscode/codespaces:
|
||||||
"env": {
|
"env": {
|
||||||
"DEBUG": "False"
|
"DEBUG": "False"
|
||||||
},
|
},
|
||||||
"args": [
|
"args": ["runserver"],
|
||||||
"runserver"
|
|
||||||
],
|
|
||||||
"django": true,
|
"django": true,
|
||||||
"justMyCode": true
|
"justMyCode": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Consider running `gulp fake --children 5 --days 7` as explained in the [gulp command reference](./gulp-command-reference.md) to add some fake data to the database
|
2. Consider running `gulp fake --children 5 --days 7` as explained in the [gulp command reference](./gulp-command-reference.md) to add some fake data to the database
|
||||||
3. Click Run -> Start Debugging (F5) and set your breakpoints in the python as desired
|
3. Click Run -> Start Debugging (F5) and set your breakpoints in the python as desired
|
||||||
|
|
|
@ -64,7 +64,7 @@ folder.
|
||||||
|
|
||||||
### `fake`
|
### `fake`
|
||||||
|
|
||||||
Adds some fake data to the database. By default, ``fake`` creates one child and
|
Adds some fake data to the database. By default, `fake` creates one child and
|
||||||
31 days of random data. Use the `--children` and `--days` flags to change the
|
31 days of random data. Use the `--children` and `--days` flags to change the
|
||||||
default values, e.g. `gulp fake --children 5 --days 7` to generate five fake
|
default values, e.g. `gulp fake --children 5 --days 7` to generate five fake
|
||||||
children and seven days of data for each.
|
children and seven days of data for each.
|
||||||
|
@ -104,7 +104,7 @@ non-overlapping arguments for this command.
|
||||||
|
|
||||||
### `reset`
|
### `reset`
|
||||||
|
|
||||||
Resets the database to a default state *with* one fake child and 31 days of
|
Resets the database to a default state _with_ one fake child and 31 days of
|
||||||
fake data.
|
fake data.
|
||||||
|
|
||||||
### `runserver`
|
### `runserver`
|
||||||
|
|
|
@ -32,7 +32,7 @@ Add and commit the changes to the `requirements.txt` file.
|
||||||
|
|
||||||
If static file assets (files in a `static_src` directory) are updated the production
|
If static file assets (files in a `static_src` directory) are updated the production
|
||||||
static files (in the [`static` directory](https://github.com/babybuddy/babybuddy/tree/master/static))
|
static files (in the [`static` directory](https://github.com/babybuddy/babybuddy/tree/master/static))
|
||||||
must also be updated *and committed*. This is done because it prevents the need for Node
|
must also be updated _and committed_. This is done because it prevents the need for Node
|
||||||
and related tooling in deployment environments. See [`gulp updatestatic`](gulp-command-reference.md#updatestatic)
|
and related tooling in deployment environments. See [`gulp updatestatic`](gulp-command-reference.md#updatestatic)
|
||||||
for more information on how to update the static files.
|
for more information on how to update the static files.
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ import screen for a particular type will list the fields generally expected to
|
||||||
be present for an import. Multiple file types -- including csv, xlsx, etc. --
|
be present for an import. Multiple file types -- including csv, xlsx, etc. --
|
||||||
are supported for the import.
|
are supported for the import.
|
||||||
|
|
||||||
The import pages do not provide *detailed* information about the required data
|
The import pages do not provide _detailed_ information about the required data
|
||||||
and formats. All rows will be checked for errors on import and any issues will
|
and formats. All rows will be checked for errors on import and any issues will
|
||||||
be reported on screen and will need to be resolved before the import can be
|
be reported on screen and will need to be resolved before the import can be
|
||||||
performed.
|
performed.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Home
|
# Home
|
||||||
|
|
||||||
A buddy for babies! Helps caregivers track sleep, feedings, diaper changes,
|
A buddy for babies! Helps caregivers track sleep, feedings, diaper changes,
|
||||||
tummy time and more to learn about and predict baby's needs without (*as much*)
|
tummy time and more to learn about and predict baby's needs without (_as much_)
|
||||||
guess work.
|
guess work.
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
|
@ -124,7 +124,7 @@ requirements are Python, a web server, an application server, and a database.
|
||||||
|
|
||||||
### Example deployment
|
### Example deployment
|
||||||
|
|
||||||
*This example assumes a 1 GB VPS instance with Ubuntu 20.04.* It uses Python 3.10,
|
_This example assumes a 1 GB VPS instance with Ubuntu 20.04._ It uses Python 3.10,
|
||||||
nginx, uwsgi and sqlite. It should be sufficient for a few users (e.g., two parents
|
nginx, uwsgi and sqlite. It should be sufficient for a few users (e.g., two parents
|
||||||
and any number of children).
|
and any number of children).
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ and any number of children).
|
||||||
pipenv shell
|
pipenv shell
|
||||||
```
|
```
|
||||||
|
|
||||||
7. Create a production settings file and set the ``SECRET_KEY`` and ``ALLOWED_HOSTS`` values
|
7. Create a production settings file and set the `SECRET_KEY` and `ALLOWED_HOSTS` values
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cp babybuddy/settings/production.example.py babybuddy/settings/production.py
|
cp babybuddy/settings/production.example.py babybuddy/settings/production.py
|
||||||
|
@ -260,13 +260,13 @@ and any number of children).
|
||||||
See [Subdirectory configuration](subdirectory.md) for additional configuration
|
See [Subdirectory configuration](subdirectory.md) for additional configuration
|
||||||
required if Baby Buddy will be hosted in a subdirectory of another server.
|
required if Baby Buddy will be hosted in a subdirectory of another server.
|
||||||
|
|
||||||
14. Symlink config and restart NGINX:
|
13. Symlink config and restart NGINX:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo ln -s /etc/nginx/sites-available/babybuddy /etc/nginx/sites-enabled/babybuddy
|
sudo ln -s /etc/nginx/sites-available/babybuddy /etc/nginx/sites-enabled/babybuddy
|
||||||
sudo service nginx restart
|
sudo service nginx restart
|
||||||
```
|
```
|
||||||
|
|
||||||
15. That's it (hopefully)!
|
14. That's it (hopefully)!
|
||||||
|
|
||||||
See [HTTPS/SSL configuration](ssl.md) for information on how to secure Baby Buddy.
|
See [HTTPS/SSL configuration](ssl.md) for information on how to secure Baby Buddy.
|
||||||
|
|
|
@ -21,7 +21,7 @@ the origin must be in `CSRF_TRUSTED_ORIGINS` to pass.
|
||||||
For example if Baby Buddy is configured in a container with a private network and a host
|
For example if Baby Buddy is configured in a container with a private network and a host
|
||||||
`babybuddy` that is exposed publicly by a proxy (e.g., nginx) at the address
|
`babybuddy` that is exposed publicly by a proxy (e.g., nginx) at the address
|
||||||
`https://baby.example.com` then form submissions from browsers will have an `Origin` of
|
`https://baby.example.com` then form submissions from browsers will have an `Origin` of
|
||||||
`https://baby.example.com` that *does not match* the host `babybudy`. This will cause a
|
`https://baby.example.com` that _does not match_ the host `babybudy`. This will cause a
|
||||||
CSRF error and the request will be rejected with a `403 Forbidden` error. To support
|
CSRF error and the request will be rejected with a `403 Forbidden` error. To support
|
||||||
this example configuration the environment variable `CSRF_TRUSTED_ORIGINS` should be set
|
this example configuration the environment variable `CSRF_TRUSTED_ORIGINS` should be set
|
||||||
to the full public address (including the scheme): `https://baby.example.com` for CSRF
|
to the full public address (including the scheme): `https://baby.example.com` for CSRF
|
||||||
|
|
|
@ -20,10 +20,10 @@ Set this environment variable to the subdirectory of the Baby Buddy installation
|
||||||
When using uWSGI and NGINX (as in the [example deployment](deployment.md#example-deployment))
|
When using uWSGI and NGINX (as in the [example deployment](deployment.md#example-deployment))
|
||||||
the following configurations are required.
|
the following configurations are required.
|
||||||
|
|
||||||
*Assume the subdirectory `babybuddy` for configuration change examples below but this
|
_Assume the subdirectory `babybuddy` for configuration change examples below but this
|
||||||
can be anything includes multiple subdirectories (e.g., `/my/apps/babybuddy`). Other
|
can be anything includes multiple subdirectories (e.g., `/my/apps/babybuddy`). Other
|
||||||
paths used in these examples also assume a configuration based on the
|
paths used in these examples also assume a configuration based on the
|
||||||
[example deployment](deployment.md#example-deployment).*
|
[example deployment](deployment.md#example-deployment)._
|
||||||
|
|
||||||
### uWSGI
|
### uWSGI
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ environment variable to the `[uwsgi]` configuration block.
|
||||||
### NGINX
|
### NGINX
|
||||||
|
|
||||||
Alter the NGINX `server` configuration to include the desired subdirectory path in the
|
Alter the NGINX `server` configuration to include the desired subdirectory path in the
|
||||||
app (Baby Buddy root) and media `location` declarations *and* add a new declaration for
|
app (Baby Buddy root) and media `location` declarations _and_ add a new declaration for
|
||||||
the static `location`.
|
the static `location`.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
|
|
52
mkdocs.yml
52
mkdocs.yml
|
@ -6,32 +6,32 @@ markdown_extensions:
|
||||||
- pymdownx.snippets
|
- pymdownx.snippets
|
||||||
- pymdownx.superfences
|
- pymdownx.superfences
|
||||||
nav:
|
nav:
|
||||||
- 'index.md'
|
- "index.md"
|
||||||
- 'Setup':
|
- "Setup":
|
||||||
- 'setup/deployment.md'
|
- "setup/deployment.md"
|
||||||
- 'setup/ssl.md'
|
- "setup/ssl.md"
|
||||||
- 'setup/subdirectory.md'
|
- "setup/subdirectory.md"
|
||||||
- 'setup/proxy.md'
|
- "setup/proxy.md"
|
||||||
- 'Configuration':
|
- "Configuration":
|
||||||
- 'configuration/intro.md'
|
- "configuration/intro.md"
|
||||||
- 'configuration/application.md'
|
- "configuration/application.md"
|
||||||
- 'configuration/database.md'
|
- "configuration/database.md"
|
||||||
- 'configuration/email.md'
|
- "configuration/email.md"
|
||||||
- 'configuration/homeassistant.md'
|
- "configuration/homeassistant.md"
|
||||||
- 'configuration/security.md'
|
- "configuration/security.md"
|
||||||
- 'configuration/storage.md'
|
- "configuration/storage.md"
|
||||||
- 'User Guide':
|
- "User Guide":
|
||||||
- 'user-guide/getting-started.md'
|
- "user-guide/getting-started.md"
|
||||||
- 'user-guide/managing-users.md'
|
- "user-guide/managing-users.md"
|
||||||
- 'user-guide/adding-entries.md'
|
- "user-guide/adding-entries.md"
|
||||||
- 'user-guide/using-timers.md'
|
- "user-guide/using-timers.md"
|
||||||
- 'Contributing':
|
- "Contributing":
|
||||||
- 'contributing/development-environment.md'
|
- "contributing/development-environment.md"
|
||||||
- 'contributing/translation.md'
|
- "contributing/translation.md"
|
||||||
- 'contributing/pull-requests.md'
|
- "contributing/pull-requests.md"
|
||||||
- 'contributing/gulp-command-reference.md'
|
- "contributing/gulp-command-reference.md"
|
||||||
- 'import-export.md'
|
- "import-export.md"
|
||||||
- 'api.md'
|
- "api.md"
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
favicon: assets/images/favicon.svg
|
favicon: assets/images/favicon.svg
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue