aboutsummaryrefslogtreecommitdiffstats
path: root/api/models.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-10-17 19:50:23 +0000
committerGravatar Johannes Christ <[email protected]>2018-10-17 19:50:23 +0000
commit7b0e0ce545238bfa21f710f983b595950a636b52 (patch)
tree66f92f9d6328e2ad4484bf412cebe3057af7056a /api/models.py
parentAdd `docker` tag to use proper runners. (diff)
parentMerge branch 'django' of https://gitlab.com/python-discord/projects/site into... (diff)
Merge branch 'snake_facts' into 'django'
Snake Facts API See merge request python-discord/projects/site!41
Diffstat (limited to 'api/models.py')
-rw-r--r--api/models.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/api/models.py b/api/models.py
index e5ec7992..7c9b63f5 100644
--- a/api/models.py
+++ b/api/models.py
@@ -60,6 +60,19 @@ class OffTopicChannelName(ModelReprMixin, models.Model):
return self.name
+class SnakeFact(ModelReprMixin, models.Model):
+ """A snake fact used by the bot's snake cog."""
+
+ fact = models.CharField(
+ primary_key=True,
+ max_length=200,
+ help_text="A fact about snakes."
+ )
+
+ def __str__(self):
+ return self.fact
+
+
class SnakeName(ModelReprMixin, models.Model):
"""A snake name used by the bot's snake cog."""