# HG changeset patch # User ymh # Date 1530791138 -7200 # Node ID b6d788cd06f14f514c5126b45e9e1b1bd347e5a9 # Parent 631f70f55fed41c7636d81aaeb4d40eebe0b3e3f rename migration diff -r 631f70f55fed -r b6d788cd06f1 src/iconolab_mcc/migrations/0001_link_text_link_url_data.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/iconolab_mcc/migrations/0001_link_text_link_url_data.py Thu Jul 05 13:45:38 2018 +0200 @@ -0,0 +1,20 @@ + +from django.db import migrations + +def copy_link_data(apps, schema_editor): + Collection = apps.get_model('iconolab', 'Collection') + for collection in Collection.objects.all(): + collection.link_text = 'Cet objet dans Joconde catalogue collectif des collections des musées de France' + collection.link_url = "http://www.culture.gouv.fr/public/mistral/joconde_fr?ACTION=CHERCHER&FIELD_98=REF&VALUE_98={joconde_ref:0>11}" + collection.save() + +class Migration(migrations.Migration): + + + dependencies = [ + ('iconolab', '0032_auto_20180704_1131'), + ] + + operations = [ + migrations.RunPython(copy_link_data), + ] diff -r 631f70f55fed -r b6d788cd06f1 src/iconolab_mcc/migrations/0033_link_text_link_url_data.py --- a/src/iconolab_mcc/migrations/0033_link_text_link_url_data.py Tue Jun 26 16:22:54 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - -from django.db import migrations - -def copy_link_data(apps, schema_editor): - Collection = apps.get_model('iconolab', 'Collection') - for collection in Collection.objects.all(): - collection.link_text = 'Cet objet dans Joconde catalogue collectif des collections des musées de France' - collection.link_url = "http://www.culture.gouv.fr/public/mistral/joconde_fr?ACTION=CHERCHER&FIELD_98=REF&VALUE_98={joconde_ref:0>11}" - collection.save() - -class Migration(migrations.Migration): - - - dependencies = [ - ('iconolab', '0032_auto_20180704_1131'), - ] - - operations = [ - migrations.RunPython(copy_link_data), - ]