aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models/bot
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-07-15 14:29:32 +0200
committerGravatar Leon Sandøy <[email protected]>2020-07-15 14:29:32 +0200
commitd03ac5fbf06bc3749e68a606601c0b793f1f0766 (patch)
tree251e48be9ee07c05e43128e158ff6887d1a76b30 /pydis_site/apps/api/models/bot
parentMinor fixes for imports and __init__ files. (diff)
Set up url forwarding for the viewset.
https://github.com/python-discord/site/issues/305
Diffstat (limited to 'pydis_site/apps/api/models/bot')
-rw-r--r--pydis_site/apps/api/models/bot/allowlist.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/pydis_site/apps/api/models/bot/allowlist.py b/pydis_site/apps/api/models/bot/allowlist.py
index c8fa2e33..b0aea066 100644
--- a/pydis_site/apps/api/models/bot/allowlist.py
+++ b/pydis_site/apps/api/models/bot/allowlist.py
@@ -1,23 +1,21 @@
from django.db import models
-from pydis_site.apps.api.models import ModelReprMixin, ModelTimestampMixin
+from pydis_site.apps.api.models.mixins import ModelReprMixin, ModelTimestampMixin
class AllowList(ModelTimestampMixin, ModelReprMixin, models.Model):
"""An item that is either allowed or denied."""
AllowListType = models.TextChoices(
- 'guild_invite_id',
- 'file_format',
- 'domain_name',
- 'word_watchlist',
+ 'AllowListType',
+ 'GUILD_INVITE_ID '
+ 'FILE_FORMAT '
+ 'DOMAIN_NAME '
+ 'WORD_WATCHLIST '
)
type = models.CharField(
max_length=50,
- help_text=(
- "The type of allowlist this is on. The value must be one of the following: "
- f"{','.join(AllowListType.choices)}."
- ),
+ help_text="The type of allowlist this is on.",
choices=AllowListType.choices,
)
allowed = models.BooleanField(