renamed List to Note everywhere thru-out project in preparation for complete overhaul of applet capabilities
This commit is contained in:
24
src/apps/applets/migrations/0004_rename_list_applet_slugs.py
Normal file
24
src/apps/applets/migrations/0004_rename_list_applet_slugs.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def rename_list_slugs(apps, schema_editor):
|
||||
Applet = apps.get_model('applets', 'Applet')
|
||||
Applet.objects.filter(slug='new-list').update(slug='new-note', name='New Note')
|
||||
Applet.objects.filter(slug='my-lists').update(slug='my-notes', name='My Notes')
|
||||
|
||||
|
||||
def reverse_rename_list_slugs(apps, schema_editor):
|
||||
Applet = apps.get_model('applets', 'Applet')
|
||||
Applet.objects.filter(slug='new-note').update(slug='new-list', name='New List')
|
||||
Applet.objects.filter(slug='my-notes').update(slug='my-lists', name='My Lists')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applets', '0003_wallet_applets'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(rename_list_slugs, reverse_rename_list_slugs),
|
||||
]
|
||||
Reference in New Issue
Block a user