| Commit message (Collapse) | Author | Age | Lines |
| |
|
|\ |
|
| |
| |
| |
| | |
Not having this timeout could cause a worker to hang indefinitely
|
|/ |
|
|
|
|
|
| |
In most cases this won't need to be specified,
so it makes more sense to move it out of the way
|
| |
|
|\ |
|
| |\ |
|
| | | |
|
| |/
| |
| |
| |
| |
| | |
Fixes a local link that points to a non-existent resource.
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
| |
| |
| | |
replit recently updated branding to replit.com, so we now reflect that in our site too.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These changes mainly aim to prevent multiple concurrent requests from
deadlocking the table due to the lazy evaluation imposed by `objects.all()`,
and introduce some quality of life changes whilst doing so.
To prevent unwanted locks, the following is done:
- Instead of evaluating the first item of `objects.all()` only in order to
determine when the table was most recently updated, we query for the least
recent updated entry and use that instead. As we use `.first()`, the model
instance is loaded directly.
The following quality of life changes are introduced:
- Instead of manual "update or create" logic for repositories retrieved from
the API, use Django's `update_or_create` instead.
- Instead of manual bulk creation of entries on initial data retrieve, Django's
`bulk_create` method is used instead.
- To allow for local testing of this endpoint without having to manually set up
GitHub REST authorization, anonymous GitHub access is used when no
`GITHUB_TOKEN` is configured.
|
|\ |
|
| | |
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
BigInt is needed as Discord's permissions number now exceeds that which can be stored
in a normal int. I have removed the max value validator, as this just adds
maintanence burden for us each time Discord adds new permissions.
|
| | | |
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Link detail section in environment variables section.
- Update old static path from pre-Docker environment times and mention the
Docker setup.
diff --git
a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md
b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md
index 8c21b5b0..24227f24 100644 ---
a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md
+++
b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md @@
-79,6 +79,9 @@ SECRET_KEY=suitable-for-development-only STATIC_ROOT=staticfiles
```
+The [Configuration in Detail](#configuration-in-detail) section contains
+detailed information about these settings.
+
#### Notes regarding `DATABASE_URL`
- If the database is hosted locally i.e. on the same machine as the webserver, then use `localhost` for the host. Windows and macOS users may need to use the [Docker host IP](../hosts-file/#windows) instead.
@@ -173,5 +176,6 @@ The website is configured through the following environment variables:
- **`SECRET_KEY`**: The secret key used in various parts of Django. Keep this
secret as the name suggests! This is managed for you in debug setups.
-- **`STATIC_ROOT`**: The root in which `python manage.py collectstatic` collects
- static files. Optional, defaults to `/var/www/pythondiscord.com`.
+- **`STATIC_ROOT`**: The root in which `python manage.py collectstatic`
+ collects static files. Optional, defaults to `/app/staticfiles` for the
+ standard Docker deployment.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
macOS uses `/var/...` as its temp directory, causing issues with the
hardcoded usage of `/tmp` as the temporary directory. Therefore,
relying on tmp is not portable.
Populating the true temporary directory is redundant and may cause more
problems because of nested directories. Move the fake content under a
subdirectory to avoid this issue.
Co-authored-by: MarkKoz <[email protected]>
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
A more specific error is raised on higher PostgreSQL versions, for example, as
with the PostgreSQL version running on my local machine. This commit fixes the
error message pattern matching behaviour by adding an optional match to the
detailed error message.
|
|/
|
|
|
| |
This is later mentioned in the connection string, but in the local setup, the
SQL statement to create the database was missing.
|
|\ |
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| |/ |
|
| |
| |
| |
| | |
Expires and permanent=false are permitted and tested for. Expires_before also filters the database for permanent=false explicitly
|
| |
| |
| |
| |
| | |
The check was backwards, enforcing that no results must ever be returned
Relevant tests have been added that actually fetch an infraction with the right times so that I'm sure it's not still broken
|
| |
| |
| |
| | |
If the before time is after the after time, or if both `type` and `types` are specified
|
| | |
|
| |
| |
| |
| | |
As this is used in the new bot infraction rescheduler
|
| | |
|
|/ |
|
|
|
|
|
|
| |
Added in wording to clarify why we don't support
the discord .txt, .py, and similar file types even though
it has preview available for them.
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Updates the Python and Sir Lancebot guides to use poetry. Updates the
dependency guide to include poetry, and explain when each dependency
manager should be used.
|
| | | |
|
| |/ |
|