From 2c172da237fb22bb54296d0a12e2598b4033f1a4 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson <frjo@xdeb.org> Date: Mon, 14 Jan 2019 13:35:40 +0100 Subject: [PATCH] Switch to use CharField. --- .circleci/config.yml | 2 +- .../apply/funds/migrations/0048_add_field_slack_channel.py | 6 +++--- opentech/apply/funds/models/applications.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 605052d3d..9acb5cfa8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,6 +77,6 @@ jobs: flake8 ./opentech python manage.py collectstatic --noinput --verbosity=0 python manage.py check - python manage.py makemigrations --check --noinput --verbosity=0 + python manage.py makemigrations --check --noinput --verbosity=1 coverage run --source='opentech' manage.py test codecov diff --git a/opentech/apply/funds/migrations/0048_add_field_slack_channel.py b/opentech/apply/funds/migrations/0048_add_field_slack_channel.py index 54a3a4147..328a04eed 100644 --- a/opentech/apply/funds/migrations/0048_add_field_slack_channel.py +++ b/opentech/apply/funds/migrations/0048_add_field_slack_channel.py @@ -1,4 +1,4 @@ -# Generated by Django 2.0.9 on 2018-11-30 09:24 +# Generated by Django 2.0.9 on 2019-01-14 12:26 from django.db import migrations, models @@ -13,11 +13,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='applicationbase', name='slack_channel', - field=models.TextField(blank=True, help_text='The slack #channel for notifications. Default channel is #webapp-test'), + field=models.CharField(blank=True, help_text='The slack #channel for notifications.', max_length=128), ), migrations.AddField( model_name='labbase', name='slack_channel', - field=models.TextField(blank=True, help_text='The slack #channel for notifications. Default channel is #webapp-test'), + field=models.CharField(blank=True, help_text='The slack #channel for notifications.', max_length=128), ), ] diff --git a/opentech/apply/funds/models/applications.py b/opentech/apply/funds/models/applications.py index ec43c9d70..0119e8c65 100644 --- a/opentech/apply/funds/models/applications.py +++ b/opentech/apply/funds/models/applications.py @@ -49,7 +49,7 @@ class ApplicationBase(EmailForm, WorkflowStreamForm): # type: ignore blank=True, ) - slack_channel = models.TextField(blank=True, help_text=_('The slack #channel for notifications. Default channel is {slack_default}').format(slack_default=settings.SLACK_DESTINATION_ROOM)) + slack_channel = models.CharField(blank=True, max_length=128, help_text=_('The slack #channel for notifications.')) objects = PageManager.from_queryset(ApplicationBaseManager)() @@ -284,7 +284,7 @@ class LabBase(EmailForm, WorkflowStreamForm, SubmittableStreamForm): # type: ig blank=True, ) - slack_channel = models.TextField(blank=True, help_text=_('The slack #channel for notifications. Default channel is {slack_default}').format(slack_default=settings.SLACK_DESTINATION_ROOM)) + slack_channel = models.CharField(blank=True, max_length=128, help_text=_('The slack #channel for notifications.')) parent_page_types = ['apply_home.ApplyHomePage'] subpage_types = [] # type: ignore -- GitLab