aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-05-28 08:28:03 +0300
committerGravatar GitHub <[email protected]>2020-05-28 08:28:03 +0300
commit8eb69db369c232e668270a25717323370883bb7d (patch)
treeb5e1d81ebabe20ce72b5ce961d326f991206ec28
parentOT: Replace help text of `used` field (diff)
parentMerge pull request #353 from python-discord/post-game-jam (diff)
Merge branch 'master' into off-topic-non-random
-rw-r--r--pydis_site/apps/api/migrations/0051_create_news_setting.py25
-rw-r--r--pydis_site/apps/api/models/bot/bot_setting.py1
-rw-r--r--pydis_site/templates/base/navbar.html2
-rw-r--r--pydis_site/templates/home/index.html2
4 files changed, 28 insertions, 2 deletions
diff --git a/pydis_site/apps/api/migrations/0051_create_news_setting.py b/pydis_site/apps/api/migrations/0051_create_news_setting.py
new file mode 100644
index 00000000..f18fdfb1
--- /dev/null
+++ b/pydis_site/apps/api/migrations/0051_create_news_setting.py
@@ -0,0 +1,25 @@
+from django.db import migrations
+
+
+def up(apps, schema_editor):
+ BotSetting = apps.get_model('api', 'BotSetting')
+ setting = BotSetting(
+ name='news',
+ data={}
+ ).save()
+
+
+def down(apps, schema_editor):
+ BotSetting = apps.get_model('api', 'BotSetting')
+ BotSetting.objects.get(name='news').delete()
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('api', '0050_remove_infractions_active_default_value'),
+ ]
+
+ operations = [
+ migrations.RunPython(up, down)
+ ]
diff --git a/pydis_site/apps/api/models/bot/bot_setting.py b/pydis_site/apps/api/models/bot/bot_setting.py
index b1c3e47c..8d48eac7 100644
--- a/pydis_site/apps/api/models/bot/bot_setting.py
+++ b/pydis_site/apps/api/models/bot/bot_setting.py
@@ -9,6 +9,7 @@ def validate_bot_setting_name(name: str) -> None:
"""Raises a ValidationError if the given name is not a known setting."""
known_settings = (
'defcon',
+ 'news',
)
if name not in known_settings:
diff --git a/pydis_site/templates/base/navbar.html b/pydis_site/templates/base/navbar.html
index 9b475189..d2ea9589 100644
--- a/pydis_site/templates/base/navbar.html
+++ b/pydis_site/templates/base/navbar.html
@@ -88,7 +88,7 @@
<strong>Events</strong>
</div>
<a class="navbar-item" href="{% url 'wiki:get' path="events/game-jam-2020/" %}">
- Upcoming: Game Jam 2020
+ Most Recent: Game Jam 2020
</a>
<a class="navbar-item" href="{% url 'wiki:get' path="events/" %}">
All events
diff --git a/pydis_site/templates/home/index.html b/pydis_site/templates/home/index.html
index bd713e55..c30cbee6 100644
--- a/pydis_site/templates/home/index.html
+++ b/pydis_site/templates/home/index.html
@@ -40,7 +40,7 @@
{# Right column container #}
<div class="column is-half-desktop">
<a href="https://pythondiscord.com/pages/events/game-jam-2020/">
- <img src="https://raw.githubusercontent.com/python-discord/branding/master/logos/logo_discord_banner/game%20jam%202020/game%20jam%202020%20-%20website%20banner.png">
+ <img src="https://raw.githubusercontent.com/python-discord/branding/master/events/game%20jam%202020/game%20jam%202020%20-%20website%20banner.png">
</a>
</div>
</div>