diff options
-rw-r--r-- | pydis_site/apps/api/migrations/0040_allow_special_off_topic_name_chars.py | 19 | ||||
-rw-r--r-- | pydis_site/apps/api/models/bot/off_topic_channel_name.py | 4 |
2 files changed, 22 insertions, 1 deletions
diff --git a/pydis_site/apps/api/migrations/0040_allow_special_off_topic_name_chars.py b/pydis_site/apps/api/migrations/0040_allow_special_off_topic_name_chars.py new file mode 100644 index 00000000..df88b76e --- /dev/null +++ b/pydis_site/apps/api/migrations/0040_allow_special_off_topic_name_chars.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.3 on 2019-09-03 14:24 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0039_add_position_field_to_role'), + ] + + operations = [ + migrations.AlterField( + model_name='offtopicchannelname', + name='name', + field=models.CharField(help_text='The actual channel name that will be used on our Discord server.', max_length=96, primary_key=True, serialize=False, validators=[django.core.validators.RegexValidator(regex="^[a-z0-9\\U0001d5a0-\\U0001d5b9-ǃ?’']+$")]), + ), + ] diff --git a/pydis_site/apps/api/models/bot/off_topic_channel_name.py b/pydis_site/apps/api/models/bot/off_topic_channel_name.py index 0891f811..29280c27 100644 --- a/pydis_site/apps/api/models/bot/off_topic_channel_name.py +++ b/pydis_site/apps/api/models/bot/off_topic_channel_name.py @@ -10,7 +10,9 @@ class OffTopicChannelName(ModelReprMixin, models.Model): name = models.CharField( primary_key=True, max_length=96, - validators=(RegexValidator(regex=r'^[a-z0-9-]+$'),), + validators=( + RegexValidator(regex=r"^[a-z0-9\U0001d5a0-\U0001d5b9-ǃ?’']+$"), + ), help_text="The actual channel name that will be used on our Discord server." ) |