aboutsummaryrefslogtreecommitdiffstats
path: root/api/models.py
diff options
context:
space:
mode:
authorGravatar Hasan-Ahmad <[email protected]>2018-10-19 18:51:48 +0100
committerGravatar Hasan-Ahmad <[email protected]>2018-10-19 18:51:48 +0100
commitb70ee7dff60759b5853534e10baff26b11665b1b (patch)
tree0cc5c181c309473654410762a899a7627e5522d7 /api/models.py
parentMerge branch 'django' of https://gitlab.com/python-discord/projects/site into... (diff)
Added snake idioms api
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..81cd63aa 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 snake idiom"
+ )
+
+ def __str__(self):
+ return self.idiom
+
+
class SnakeName(ModelReprMixin, models.Model):
"""A snake name used by the bot's snake cog."""