mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
models: Create starred_message_counts boolean field.
This commit is contained in:
20
zerver/migrations/0186_userprofile_starred_message_counts.py
Normal file
20
zerver/migrations/0186_userprofile_starred_message_counts.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.14 on 2018-08-17 06:06
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('zerver', '0185_realm_plan_type'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='userprofile',
|
||||||
|
name='starred_message_counts',
|
||||||
|
field=models.BooleanField(default=False),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -768,6 +768,7 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
|
|||||||
night_mode = models.BooleanField(default=False) # type: bool
|
night_mode = models.BooleanField(default=False) # type: bool
|
||||||
translate_emoticons = models.BooleanField(default=False) # type: bool
|
translate_emoticons = models.BooleanField(default=False) # type: bool
|
||||||
dense_mode = models.BooleanField(default=True) # type: bool
|
dense_mode = models.BooleanField(default=True) # type: bool
|
||||||
|
starred_message_counts = models.BooleanField(default=False) # type: bool
|
||||||
|
|
||||||
# A timezone name from the `tzdata` database, as found in pytz.all_timezones.
|
# A timezone name from the `tzdata` database, as found in pytz.all_timezones.
|
||||||
#
|
#
|
||||||
@@ -822,6 +823,7 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
|
|||||||
high_contrast_mode=bool,
|
high_contrast_mode=bool,
|
||||||
night_mode=bool,
|
night_mode=bool,
|
||||||
translate_emoticons=bool,
|
translate_emoticons=bool,
|
||||||
|
starred_message_counts=bool,
|
||||||
)
|
)
|
||||||
|
|
||||||
notification_setting_types = dict(
|
notification_setting_types = dict(
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ class HomeTest(ZulipTestCase):
|
|||||||
"server_generation",
|
"server_generation",
|
||||||
"server_inline_image_preview",
|
"server_inline_image_preview",
|
||||||
"server_inline_url_embed_preview",
|
"server_inline_url_embed_preview",
|
||||||
|
"starred_message_counts",
|
||||||
"starred_messages",
|
"starred_messages",
|
||||||
"stream_description_max_length",
|
"stream_description_max_length",
|
||||||
"stream_name_max_length",
|
"stream_name_max_length",
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ def update_display_settings_backend(
|
|||||||
request: HttpRequest, user_profile: UserProfile,
|
request: HttpRequest, user_profile: UserProfile,
|
||||||
twenty_four_hour_time: Optional[bool]=REQ(validator=check_bool, default=None),
|
twenty_four_hour_time: Optional[bool]=REQ(validator=check_bool, default=None),
|
||||||
dense_mode: Optional[bool]=REQ(validator=check_bool, default=None),
|
dense_mode: Optional[bool]=REQ(validator=check_bool, default=None),
|
||||||
|
starred_message_counts: Optional[bool]=REQ(validator=check_bool, default=None),
|
||||||
high_contrast_mode: Optional[bool]=REQ(validator=check_bool, default=None),
|
high_contrast_mode: Optional[bool]=REQ(validator=check_bool, default=None),
|
||||||
night_mode: Optional[bool]=REQ(validator=check_bool, default=None),
|
night_mode: Optional[bool]=REQ(validator=check_bool, default=None),
|
||||||
translate_emoticons: Optional[bool]=REQ(validator=check_bool, default=None),
|
translate_emoticons: Optional[bool]=REQ(validator=check_bool, default=None),
|
||||||
|
|||||||
Reference in New Issue
Block a user