From e9c65c836f5d269d0f597986f6ec37214e5edd92 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Sat, 1 Sep 2018 00:23:54 +0200 Subject: Add the `OffTopicChannelName` model. --- api/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'api/models.py') diff --git a/api/models.py b/api/models.py index 877e3622..7f4175af 100644 --- a/api/models.py +++ b/api/models.py @@ -1,3 +1,4 @@ +from django.core.validators import RegexValidator from django.db import models @@ -9,6 +10,14 @@ class DocumentationLink(models.Model): inventory_url = models.URLField() +class OffTopicChannelName(models.Model): + name = models.CharField( + primary_key=True, + max_length=96, + validators=(RegexValidator(regex=r'^[a-z0-9-]+$'),) + ) + + class SnakeName(models.Model): """A snake name used by the bot's snake cog.""" -- cgit v1.2.3