From e5381c0c7ca0278ce28a7e11cff9d0aa649cbe1f Mon Sep 17 00:00:00 2001 From: Jer-Pha <131234246+Jer-Pha@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:38:55 -0700 Subject: [PATCH 1/2] Add redirect url shortcuts for external links --- pythonsd/urls.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pythonsd/urls.py b/pythonsd/urls.py index 4863066..09ab3ed 100644 --- a/pythonsd/urls.py +++ b/pythonsd/urls.py @@ -67,6 +67,18 @@ r"pages/job-posting-guidelines.html", generic.RedirectView.as_view(url="/", permanent=False), ), + # URL shortcuts for popular external links + path( + r"discord/", + generic.RedirectView.as_view(url="https://discord.gg/8GpWuVvdbQ", permanent=False), + ), + path( + r"youtube/", + generic.RedirectView.as_view( + url="https://www.youtube.com/@sandiegopython/streams", + permanent=False, + ), + ), ] urlpatterns += redirects From 59de034065cc88d33dc7b9c4d205202feeaf79c4 Mon Sep 17 00:00:00 2001 From: Jer-Pha <131234246+Jer-Pha@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:42:36 -0700 Subject: [PATCH 2/2] Fix formatting --- pythonsd/urls.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pythonsd/urls.py b/pythonsd/urls.py index 09ab3ed..c71d7c6 100644 --- a/pythonsd/urls.py +++ b/pythonsd/urls.py @@ -70,7 +70,10 @@ # URL shortcuts for popular external links path( r"discord/", - generic.RedirectView.as_view(url="https://discord.gg/8GpWuVvdbQ", permanent=False), + generic.RedirectView.as_view( + url="https://discord.gg/8GpWuVvdbQ", + permanent=False, + ), ), path( r"youtube/",