aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar ks123 <[email protected]>2020-03-30 13:30:00 +0300
committerGravatar ks123 <[email protected]>2020-03-30 13:30:00 +0300
commit46ef497fd028531ffac8ebc19dec41a3272f72a3 (patch)
tree7b107a786bf5655a920b87db3c63a37bfb8b49e5 /pydis_site
parentAdd Game Jam banner to landing page (diff)
(Off-topic Channel Names): Added new field to model: `used` that show is this name already used on this round of names, added migration for this.
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/api/migrations/0051_offtopicchannelname_used.py18
-rw-r--r--pydis_site/apps/api/models/bot/off_topic_channel_name.py5
2 files changed, 23 insertions, 0 deletions
diff --git a/pydis_site/apps/api/migrations/0051_offtopicchannelname_used.py b/pydis_site/apps/api/migrations/0051_offtopicchannelname_used.py
new file mode 100644
index 00000000..74836d8c
--- /dev/null
+++ b/pydis_site/apps/api/migrations/0051_offtopicchannelname_used.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.2.11 on 2020-03-30 10:24
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('api', '0050_remove_infractions_active_default_value'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='offtopicchannelname',
+ name='used',
+ field=models.BooleanField(default=False, help_text='Show is channel already used as channel name in this round.'),
+ ),
+ ]
diff --git a/pydis_site/apps/api/models/bot/off_topic_channel_name.py b/pydis_site/apps/api/models/bot/off_topic_channel_name.py
index 29280c27..3345754d 100644
--- a/pydis_site/apps/api/models/bot/off_topic_channel_name.py
+++ b/pydis_site/apps/api/models/bot/off_topic_channel_name.py
@@ -16,6 +16,11 @@ class OffTopicChannelName(ModelReprMixin, models.Model):
help_text="The actual channel name that will be used on our Discord server."
)
+ used = models.BooleanField(
+ default=False,
+ help_text="Show is channel already used as channel name in this round."
+ )
+
def __str__(self):
"""Returns the current off-topic name, for display purposes."""
return self.name