diff options
author | 2019-07-10 11:10:49 +0200 | |
---|---|---|
committer | 2019-07-10 11:10:49 +0200 | |
commit | 0d69539cde6371e55dba8616870e6fd0df16bdeb (patch) | |
tree | 9a2cde339578df62857227ce0273fad9a17798fc /pydis_site/apps/api/models | |
parent | Give a code a lint (diff) |
Removing all the snake-related stuff. The snakes cog is now handled by SeasonalBot, and no longer relies on any API endpoints.
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r-- | pydis_site/apps/api/models/__init__.py | 4 | ||||
-rw-r--r-- | pydis_site/apps/api/models/bot/__init__.py | 4 | ||||
-rw-r--r-- | pydis_site/apps/api/models/bot/snake_fact.py | 17 | ||||
-rw-r--r-- | pydis_site/apps/api/models/bot/snake_idiom.py | 17 | ||||
-rw-r--r-- | pydis_site/apps/api/models/bot/snake_name.py | 24 | ||||
-rw-r--r-- | pydis_site/apps/api/models/bot/special_snake.py | 27 |
6 files changed, 0 insertions, 93 deletions
diff --git a/pydis_site/apps/api/models/__init__.py b/pydis_site/apps/api/models/__init__.py index 4645bda2..a7eccb04 100644 --- a/pydis_site/apps/api/models/__init__.py +++ b/pydis_site/apps/api/models/__init__.py @@ -9,10 +9,6 @@ from .bot import ( # noqa OffTopicChannelName, Reminder, Role, - SnakeFact, - SnakeIdiom, - SnakeName, - SpecialSnake, Tag, User ) diff --git a/pydis_site/apps/api/models/bot/__init__.py b/pydis_site/apps/api/models/bot/__init__.py index fb313193..b805924a 100644 --- a/pydis_site/apps/api/models/bot/__init__.py +++ b/pydis_site/apps/api/models/bot/__init__.py @@ -8,9 +8,5 @@ from .nomination import Nomination # noqa from .off_topic_channel_name import OffTopicChannelName # noqa from .reminder import Reminder # noqa from .role import Role # noqa -from .snake_fact import SnakeFact # noqa -from .snake_idiom import SnakeIdiom # noqa -from .snake_name import SnakeName # noqa -from .special_snake import SpecialSnake # noqa from .tag import Tag # noqa from .user import User # noqa diff --git a/pydis_site/apps/api/models/bot/snake_fact.py b/pydis_site/apps/api/models/bot/snake_fact.py deleted file mode 100644 index e4486d41..00000000 --- a/pydis_site/apps/api/models/bot/snake_fact.py +++ /dev/null @@ -1,17 +0,0 @@ -from django.db import models - -from pydis_site.apps.api.models.utils import ModelReprMixin - - -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): - """Returns the current snake fact, for display purposes.""" - return self.fact diff --git a/pydis_site/apps/api/models/bot/snake_idiom.py b/pydis_site/apps/api/models/bot/snake_idiom.py deleted file mode 100644 index 73ce25eb..00000000 --- a/pydis_site/apps/api/models/bot/snake_idiom.py +++ /dev/null @@ -1,17 +0,0 @@ -from django.db import models - -from pydis_site.apps.api.models.utils import ModelReprMixin - - -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): - """Returns the current idiom, for display purposes.""" - return self.idiom diff --git a/pydis_site/apps/api/models/bot/snake_name.py b/pydis_site/apps/api/models/bot/snake_name.py deleted file mode 100644 index 6d33f872..00000000 --- a/pydis_site/apps/api/models/bot/snake_name.py +++ /dev/null @@ -1,24 +0,0 @@ -from django.core.validators import RegexValidator -from django.db import models - -from pydis_site.apps.api.models.utils import ModelReprMixin - - -class SnakeName(ModelReprMixin, models.Model): - """A snake name used by the bot's snake cog.""" - - name = models.CharField( - primary_key=True, - max_length=100, - help_text="The regular name for this snake, e.g. 'Python'.", - validators=[RegexValidator(regex=r'^([^0-9])+$')] - ) - scientific = models.CharField( - max_length=150, - help_text="The scientific name for this snake, e.g. 'Python bivittatus'.", - validators=[RegexValidator(regex=r'^([^0-9])+$')] - ) - - def __str__(self): - """Returns the regular and scientific name of the current snake, for display purposes.""" - return f"{self.name} ({self.scientific})" diff --git a/pydis_site/apps/api/models/bot/special_snake.py b/pydis_site/apps/api/models/bot/special_snake.py deleted file mode 100644 index 5d38ab6f..00000000 --- a/pydis_site/apps/api/models/bot/special_snake.py +++ /dev/null @@ -1,27 +0,0 @@ -from django.contrib.postgres import fields as pgfields -from django.core.validators import RegexValidator -from django.db import models - -from pydis_site.apps.api.models.utils import ModelReprMixin - - -class SpecialSnake(ModelReprMixin, models.Model): - """A special snake's name, info and image from our database used by the bot's snake cog.""" - - name = models.CharField( - max_length=140, - primary_key=True, - help_text='A special snake name.', - validators=[RegexValidator(regex=r'^([^0-9])+$')] - ) - info = models.TextField( - help_text='Info about a special snake.' - ) - images = pgfields.ArrayField( - models.URLField(), - help_text='Images displaying this special snake.' - ) - - def __str__(self): - """Returns the name of the current snake, for display purposes.""" - return self.name |