APIDownloadView doesn't seem to work
Just look this :
curl -H 'Authorization: Token token=kQ3IT3KMdK95Sv97AprTSmp7pl7DBfbA' 'http://localhost:8008/api/v1/jobs/1' | jq .
{
"1": {
"files": {
"test.txt": "http://localhost:8008/datastore/1/test.txt",
"allgo.log": "http://localhost:8008/datastore/1/allgo.log",
"test2.csv": "http://localhost:8008/datastore/1/test2.csv"
},
"status": "done"
}
}
Ok, my job is done, and some files are availables.
If I try to get them through the API (not the url provided)
curl -H 'Authorization: Token token=kQ3IT3KMdK95Sv97AprTSmp7pl7DBfbA' 'http://localhost:8008/api/v1/datastore/1/allgo.log'
# HTML error no URL pattern found
If I use the URL provided with job status = not using API
curl -H 'Authorization: Token token=kQ3IT3KMdK95Sv97AprTSmp7pl7DBfbA' 'http://localhost:8008/datastore/1/allgo.log'
# HTML error no URL pattern found
Indeed, the corresponding API URL : url(r'^datastore/(?P<pk>\d+)/(.*)/(.*)', views.APIDownloadView, name='download'),
looks wrong. => /(.*) useless. Also, but not impacting here we should use as_view() method.