aboutsummaryrefslogtreecommitdiffstats
path: root/api/models.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-10-21 20:22:11 +0000
committerGravatar Johannes Christ <[email protected]>2018-10-21 20:22:11 +0000
commit0232d1a8b4a00c3e03153f0820810397effc9285 (patch)
treeed6ba70cc3801be8cc513883a532a415f4639e3a /api/models.py
parentDrop extra whitespace. (diff)
parentfixed linting issues (diff)
Merge branch 'snake_idioms' into 'django'
Snake idioms API See merge request python-discord/projects/site!44
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 7c9b63f5..bb520f8c 100644
--- a/api/models.py
+++ b/api/models.py
@@ -73,6 +73,19 @@ class SnakeFact(ModelReprMixin, models.Model):
return self.fact
+class SnakeIdiom(ModelReprMixin, models.Model):
+ """A snake idiom used by the snake cog."""
+
+ idiom = models.CharField(
+ primary_key=True,
+ max_length=140,
+ help_text="A saying about a snake."
+ )
+
+ def __str__(self):
+ return self.idiom
+
+
class SnakeName(ModelReprMixin, models.Model):
"""A snake name used by the bot's snake cog."""