]> git.0d.be Git - django-panik-nonstop.git/commitdiff
include date/time when track was added to nonstop to search exports
authorFrédéric Péters <fpeters@0d.be>
Thu, 15 Mar 2018 11:04:35 +0000 (12:04 +0100)
committerFrédéric Péters <fpeters@0d.be>
Thu, 15 Mar 2018 11:04:35 +0000 (12:04 +0100)
nonstop/views.py

index c91820e23d11118f0be866a3c8217db434c500a4..16cab277684fc7646ad1698592c5b7a3d573ccb0 100644 (file)
@@ -45,7 +45,7 @@ class SomaDayArchiveCsvView(SomaDayArchiveView):
                     line.filepath.track.language,
                     line.filepath.track.instru and 'instru' or '',
                     line.filepath.track.cfwb and 'cfwb' or '',
-                    line.filepath.added_to_nonstop_timestamp.strftime('%Y-%m-%d %H:%M') if line.filepath.added_to_nonstop_timestamp else '',
+                    line.filepath.track.added_to_nonstop_timestamp.strftime('%Y-%m-%d %H:%M') if line.filepath.added_to_nonstop_timestamp else '',
                     ])
             else:
                 writer.writerow([line.play_timestamp.strftime('%Y-%m-%d %H:%M'),
@@ -307,7 +307,9 @@ class SearchCsvView(SearchView):
                 ' + '.join([x.title.encode('utf-8') for x in track.nonstop_zones.all()]),
                 track.language or '',
                 track.instru and 'instru' or '',
-                track.cfwb and 'cfwb' or ''])
+                track.cfwb and 'cfwb' or '',
+                track.added_to_nonstop_timestamp.strftime('%Y-%m-%d %H:%M') if track.added_to_nonstop_timestamp else '',
+                ])
         return HttpResponse(out.getvalue(), content_type='text/csv; charset=utf-8')