aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar swfarnsworth <[email protected]>2021-05-15 09:26:56 -0400
committerGravatar swfarnsworth <[email protected]>2021-05-15 09:26:56 -0400
commit68bff1c230fc80c0e82e4e624e590dd4d41a5091 (patch)
treec4fc149f21df0b0e368660a8a446a0a9f0fa46b8
parentChanged rules to those agreed upon in a prior staff meeting. (diff)
parentMerge pull request #489 from python-discord/revert-488-vcokltfre/fix/uppercas... (diff)
Merge branch 'main' of https://github.com/python-discord/site into swfarnsworth/rules_update
-rw-r--r--pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md5
-rw-r--r--pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot/env-var-reference.md3
-rw-r--r--pydis_site/apps/redirect/redirects.yaml6
-rw-r--r--pydis_site/apps/redirect/tests.py2
-rw-r--r--pydis_site/apps/redirect/views.py4
5 files changed, 13 insertions, 7 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 0948e513..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,14 +103,13 @@ 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.* |
---
-If you are running on the host, while not required, we advise you set `USE_FAKEREDIS` to `true` in the config file during development to avoid the need of setting up a Redis server.
+If you are running on the host, while not required, we advise you set `use_fakeredis` to `true` in your `config.yml` file during development to avoid the need of setting up a Redis server.
It does mean you may lose persistent data on restart but this is non-critical.
Otherwise, you should set up a Redis instance and fill in the necessary config.
{: .notification .is-warning }
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