Skip to content
Snippets Groups Projects
Commit d5cb3a40 authored by Fredrik Jonsson's avatar Fredrik Jonsson
Browse files

Add slack channel field to Funds and Labs.

parent 9ba0495a
No related branches found
No related tags found
No related merge requests found
# Generated by Django 2.0.9 on 2018-11-30 09:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('funds', '0047_add_markdown'),
]
operations = [
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'),
),
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'),
),
]
...@@ -7,6 +7,7 @@ from django.db.models import OuterRef, Q, Subquery ...@@ -7,6 +7,7 @@ from django.db.models import OuterRef, Q, Subquery
from django.http import Http404 from django.http import Http404
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.text import mark_safe from django.utils.text import mark_safe
from django.utils.translation import ugettext_lazy as _
from modelcluster.fields import ParentalManyToManyField from modelcluster.fields import ParentalManyToManyField
...@@ -48,6 +49,8 @@ class ApplicationBase(EmailForm, WorkflowStreamForm): # type: ignore ...@@ -48,6 +49,8 @@ class ApplicationBase(EmailForm, WorkflowStreamForm): # type: ignore
blank=True, 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))
objects = PageManager.from_queryset(ApplicationBaseManager)() objects = PageManager.from_queryset(ApplicationBaseManager)()
parent_page_types = ['apply_home.ApplyHomePage'] parent_page_types = ['apply_home.ApplyHomePage']
...@@ -82,6 +85,7 @@ class ApplicationBase(EmailForm, WorkflowStreamForm): # type: ignore ...@@ -82,6 +85,7 @@ class ApplicationBase(EmailForm, WorkflowStreamForm): # type: ignore
content_panels = WorkflowStreamForm.content_panels + [ content_panels = WorkflowStreamForm.content_panels + [
FieldPanel('reviewers'), FieldPanel('reviewers'),
FieldPanel('slack_channel'),
] ]
edit_handler = TabbedInterface([ edit_handler = TabbedInterface([
...@@ -280,12 +284,15 @@ class LabBase(EmailForm, WorkflowStreamForm, SubmittableStreamForm): # type: ig ...@@ -280,12 +284,15 @@ class LabBase(EmailForm, WorkflowStreamForm, SubmittableStreamForm): # type: ig
blank=True, 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))
parent_page_types = ['apply_home.ApplyHomePage'] parent_page_types = ['apply_home.ApplyHomePage']
subpage_types = [] # type: ignore subpage_types = [] # type: ignore
content_panels = WorkflowStreamForm.content_panels + [ content_panels = WorkflowStreamForm.content_panels + [
FieldPanel('lead'), FieldPanel('lead'),
FieldPanel('reviewers'), FieldPanel('reviewers'),
FieldPanel('slack_channel'),
] ]
edit_handler = TabbedInterface([ edit_handler = TabbedInterface([
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment