diff options
author | 2021-05-15 07:02:50 +0300 | |
---|---|---|
committer | 2021-05-15 07:02:50 +0300 | |
commit | d76f694d1255f4197e00d7f6edf028503db49575 (patch) | |
tree | 69c12cde1bcfd84602155680408c0f3f4a7d9540 | |
parent | Explicitly state which config file should be used for use_fakeredis (diff) | |
parent | Merge pull request #492 from python-discord/joe/redirect-app-301 (diff) |
Merge branch 'main' into revert-488-vcokltfre/fix/uppercase-env
5 files changed, 12 insertions, 6 deletions
diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md index 169eb945..9e0f323a 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md @@ -103,9 +103,8 @@ The following is a list of all available environment variables used by the bot: | -------- | -------- | -------- | | `BOT_TOKEN` | Always | Your Discord bot account's token (see [Test server and bot account](#test-server-and-bot-account)). | | `BOT_API_KEY` | When running bot without Docker | Used to authenticate with the site's API. When using Docker to run the bot, this is automatically set. By default, the site will always have the API key shown in the example below. | -| `REDDIT_CLIENT_ID` | reddit cog | OAuth2 client ID for authenticating with the [reddit API](https://github.com/reddit-archive/reddit/wiki/OAuth2). | -| `REDDIT_SECRET` | reddit cog | OAuth2 secret for authenticating with the reddit API. *Leave empty if you're not using the reddit API.* | | `BOT_SENTRY_DSN` | When connecting the bot to sentry | The DSN of the sentry monitor. | +| `BOT_TRACE_LOGGERS ` | When you wish to see specific or all trace logs | Comma separated list that specifies which loggers emit trace logs through the listed names. If the ! prefix is used, all of the loggers except the listed ones are set to the trace level. If * is used, the root logger is set to the trace level. | | `REDIS_PASSWORD` | When not using FakeRedis | The password to connect to the redis database. *Leave empty if you're not using REDIS.* | --- diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot/env-var-reference.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot/env-var-reference.md index 066b703e..47f01f44 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot/env-var-reference.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot/env-var-reference.md @@ -43,6 +43,9 @@ If you will be working with an external service, you might have to set one of th | `GITHUB_TOKEN` | Personal access token for GitHub, raises rate limits from 60 to 5000 requests per hour. | | `GIPHY_TOKEN` | Required for API access. [Docs](https://developers.giphy.com/docs/api) | | `OMDB_API_KEY` | Required for API access. [Docs](http://www.omdbapi.com/) | +| `REDDIT_CLIENT_ID` | OAuth2 client ID for authenticating with the [reddit API](https://github.com/reddit-archive/reddit/wiki/OAuth2). | +| `REDDIT_SECRET` | OAuth2 secret for authenticating with the reddit API. *Leave empty if you're not using the reddit API.* | +| `REDDIT_WEBHOOK` | Webhook ID for Reddit channel | | `YOUTUBE_API_KEY` | An OAuth Key or Token are required for API access. [Docs](https://developers.google.com/youtube/v3/docs#calling-the-api) | | `TMDB_API_KEY` | Required for API access. [Docs](https://developers.themoviedb.org/3/getting-started/introduction) | | `NASA_API_KEY` | Required for API access. [Docs](https://api.nasa.gov/) | diff --git a/pydis_site/apps/redirect/redirects.yaml b/pydis_site/apps/redirect/redirects.yaml index ce789b61..c5f113fb 100644 --- a/pydis_site/apps/redirect/redirects.yaml +++ b/pydis_site/apps/redirect/redirects.yaml @@ -70,6 +70,12 @@ off-topic_redirect: redirect_route: "content:page_category" redirect_arguments: ["guides/pydis-guides/off-topic-etiquette"] +good_questions_redirect_alt: + # In a few places we were linking to a version outside of the guides app. + original_path: pages/asking-good-questions/ + redirect_route: "content:page_category" + redirect_arguments: ["guides/pydis-guides/asking-good-questions"] + # Resources resources_index_redirect: original_path: pages/resources/ diff --git a/pydis_site/apps/redirect/tests.py b/pydis_site/apps/redirect/tests.py index fce2642f..2cfa3478 100644 --- a/pydis_site/apps/redirect/tests.py +++ b/pydis_site/apps/redirect/tests.py @@ -56,6 +56,6 @@ class RedirectTests(TestCase): f"home:{data['redirect_route']}", args=expected_args ), - status_code=302 + status_code=301 ) self.assertEqual(resp.status_code, 200) diff --git a/pydis_site/apps/redirect/views.py b/pydis_site/apps/redirect/views.py index 9dc9881a..21180cdf 100644 --- a/pydis_site/apps/redirect/views.py +++ b/pydis_site/apps/redirect/views.py @@ -6,9 +6,7 @@ from django.views.generic import RedirectView class CustomRedirectView(RedirectView): """Extended RedirectView for manual route args.""" - # We want temporary redirects for the time being, after this is running on prod and - # stable we can enable permanent redirects. - permanent = False + permanent = True static_args = () prefix_redirect = False |