mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
hotspots: Turn on hotspots for new users.
We need a migration to clear the tutorial_status for existing users, so that we don't show hotspots to anyone who signed up for Zulip in the month or so since we deleted the old tutorial.
This commit is contained in:
@@ -271,6 +271,7 @@ $(function () {
|
|||||||
drafts.initialize();
|
drafts.initialize();
|
||||||
sent_messages.initialize();
|
sent_messages.initialize();
|
||||||
compose.initialize();
|
compose.initialize();
|
||||||
|
hotspots.initialize();
|
||||||
ui.initialize();
|
ui.initialize();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
19
zerver/migrations/0109_mark_tutorial_status_finished.py
Normal file
19
zerver/migrations/0109_mark_tutorial_status_finished.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from django.db import models, migrations
|
||||||
|
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
|
||||||
|
from django.db.migrations.state import StateApps
|
||||||
|
|
||||||
|
def set_tutorial_status_to_finished(apps, schema_editor):
|
||||||
|
# type: (StateApps, DatabaseSchemaEditor) -> None
|
||||||
|
UserProfile = apps.get_model('zerver', 'UserProfile')
|
||||||
|
UserProfile.objects.update(tutorial_status=u'F')
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('zerver', '0108_fix_default_string_id'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(set_tutorial_status_to_finished)
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user