mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
models: Add field is_announcement_only to stream.
This commit is contained in:
committed by
Tim Abbott
parent
08d20dce23
commit
a5759108d3
20
zerver/migrations/0169_stream_is_announcement_only.py
Normal file
20
zerver/migrations/0169_stream_is_announcement_only.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.6 on 2018-05-12 04:57
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('zerver', '0168_stream_is_web_public'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='stream',
|
||||||
|
name='is_announcement_only',
|
||||||
|
field=models.BooleanField(default=False),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -962,6 +962,7 @@ class Stream(models.Model):
|
|||||||
|
|
||||||
date_created = models.DateTimeField(default=timezone_now) # type: datetime.datetime
|
date_created = models.DateTimeField(default=timezone_now) # type: datetime.datetime
|
||||||
deactivated = models.BooleanField(default=False) # type: bool
|
deactivated = models.BooleanField(default=False) # type: bool
|
||||||
|
is_announcement_only = models.BooleanField(default=False) # type: bool
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return "<Stream: %s>" % (self.name,)
|
return "<Stream: %s>" % (self.name,)
|
||||||
|
|||||||
Reference in New Issue
Block a user