+ pict.title = picture_xml.picture_info.title
+
+ # from nose.tools import set_trace; set_trace()
+ motif_tags = set()
+ for part in picture_xml.partiter():
+ for motif in part['themes']:
+ tag, created = catalogue.models.Tag.objects.get_or_create(slug=slughifi(motif), category='theme')
+ if created:
+ tag.name = motif
+ tag.sort_key = sortify(tag.name)
+ tag.save()
+ motif_tags.add(tag)