@@ -0,0 +1,1422 @@
+from django.core.management.base import BaseCommand%0A%0Afrom timeside.server.models import (%0A    Item,%0A    Provider,%0A    Selection,%0A    Experience,%0A)%0A%0Aimport timeside.core%0Aimport json%0Afrom os.path import join%0Aimport sys%0A%0A# DALI columns descriptions%0ADALI_ID, WASABI_ID, NAME, DEEZER_ID, YOUTUBE, WORKING = 0, 1, 2, 3, 4, 5%0A%0A%0Aclass Command(BaseCommand):%0A    help = %22%22%22%0A    Create an Item for all DALI's tracks%0A    with deezer_complete provider%0A    %22%22%22%0A%0A    def handle(self, *args, **options):%0A        with open(join(sys.path%5B0%5D, 'DALI_deezer.json'), %22r%22) as json_file:%0A            dali, c = Selection.objects.get_or_create(%0A                title=%22DALI_corpus%22,%0A                # items=%5B%5D,%0A                # selections=%5B%5D,%0A            )%0A            # skipping first line of columns descriptions%0A            data = json.load(json_file)%5B1:%5D%0A            for track in data:%0A                item, c = Item.objects.get_or_create(%0A                    external_id=track%5BDEEZER_ID%5D,%0A                    title=track%5BNAME%5D,%0A                    description=(f%22DALI_ID: %7Btrack%5BDALI_ID%5D%7D%5Cn%22%0A                                 f%22WASABI_ID: %7Btrack%5BWASABI_ID%5D%7D%5Cn%22%0A                                 f%22YOUTUBE_ID: %7Btrack%5BYOUTUBE%5D%7D%5Cn%22%0A                                 f%22WORKING: %7Btrack%5BWORKING%5D%7D%22),%0A                    provider=Provider.objects.get(pid='deezer_complete')                    %0A                    )%0A                dali.items.add(item)%0A

add DALI corpus file and server creation command