Skip to content

Commit 6268291

Browse files
authored
Merge pull request #198 from sandiegopython/davidfischer/add-named-redirects
Add named redirects for Discord/Presenting/YouTube
2 parents 61c3e13 + 78b4d5a commit 6268291

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

pythonsd/templates/pythonsd/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
</div>
8989

9090
<div class="w-8 h-8">
91-
<a href="https://discord.gg/8GpWuVvdbQ" rel="nofollow noopener noreferrer">
91+
<a href="{% url 'redirect_discord' %}" rel="nofollow noopener noreferrer">
9292
<span class="sr-only">Discord</span>
9393
<svg class="text-slate-500 hover:text-slate-800" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"/></svg>
9494
</a>

pythonsd/templates/pythonsd/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h2 id="discord">Join us on Discord</h2>
3535
<p>Meetup events aren't the only time for chatting. There's also a Discord server. Sign on to ask questions, give answers, or just hang out with fellow Python developers. San Diego Python's Discord server has channels for #web-dev, #machine-learning, and the #jobs channel is a great place to promote a job at your company or find a position with a local company. Our Saturday meetups meet on Discord.</p>
3636

3737
<div class="flex flex-wrap justify-center gap-4">
38-
<a href="https://discord.gg/8GpWuVvdbQ" rel="nofollow noopener noreferrer" class="btn">
38+
<a href="{% url 'redirect_discord' %}" rel="nofollow noopener noreferrer" class="btn">
3939
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"/></svg>
4040
<span>Join our Discord</span>
4141
</a>
@@ -50,7 +50,7 @@ <h2>Upcoming meetups</h2>
5050
<p>Interested in giving a 5-7 minute talk at the monthly meetup? We welcome speakers presenting on site in San Diego or remotely. Longer talks are possible with approval.</p>
5151

5252
<div class="flex flex-wrap justify-center gap-4">
53-
<a href="http://pysd.io/talk" rel="nofollow noopener noreferrer" class="btn">
53+
<a href="{% url 'redirect_presentation' %}" rel="nofollow noopener noreferrer" class="btn">
5454
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M160 64c0-35.3 28.7-64 64-64L576 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64l-239.2 0c-11.8-25.5-29.9-47.5-52.4-64l99.6 0 0-32c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 32 64 0 0-288L224 64l0 49.1C205.2 102.2 183.3 96 160 96l0-32zm0 64a96 96 0 1 1 0 192 96 96 0 1 1 0-192zM133.3 352l53.3 0C260.3 352 320 411.7 320 485.3c0 14.7-11.9 26.7-26.7 26.7L26.7 512C11.9 512 0 500.1 0 485.3C0 411.7 59.7 352 133.3 352z"/></svg>
5555
<span>Present at our meetup</span>
5656
</a>

pythonsd/urls.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,23 @@
7676
url="https://discord.gg/8GpWuVvdbQ",
7777
permanent=False,
7878
),
79+
name="redirect_discord",
7980
),
8081
path(
8182
r"youtube/",
8283
generic.RedirectView.as_view(
8384
url="https://www.youtube.com/@sandiegopython/streams",
8485
permanent=False,
8586
),
87+
name="redirect_youtube",
88+
),
89+
path(
90+
r"present/",
91+
generic.RedirectView.as_view(
92+
url="https://docs.google.com/forms/d/e/1FAIpQLSfBUQjcSrnG7Afi-Uz6ewgFz45Vquea2Vj5egTEmTmoUAUHSg/viewform",
93+
permanent=False,
94+
),
95+
name="redirect_presentation",
8696
),
8797
]
8898

0 commit comments

Comments
 (0)