id aendern
This commit is contained in:
parent
b8c7f27dd3
commit
e8bcb38cca
|
|
@ -263,6 +263,8 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ncfiledata[0] = ['standardid', id];
|
||||||
|
console.log(ncfiledata);
|
||||||
console.log("NC FILES LOADED, STARTING REBUILDING STANDARDS");
|
console.log("NC FILES LOADED, STARTING REBUILDING STANDARDS");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{% url 'api:apiswitchstandards' %}",
|
url: "{% url 'api:apiswitchstandards' %}",
|
||||||
|
|
|
||||||
|
|
@ -482,7 +482,7 @@ def NCGetFilesForStandardSwitch(request):
|
||||||
standard = Standards.objects.get(pk=request.GET.get('standardid'))
|
standard = Standards.objects.get(pk=request.GET.get('standardid'))
|
||||||
|
|
||||||
# Dateien aus NC laden
|
# Dateien aus NC laden
|
||||||
filesearchdata = '<?xml version="1.0" encoding="UTF-8"?><d:searchrequest xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:basicsearch><d:select><d:prop><oc:fileid/></d:prop></d:select><d:from><d:scope><d:href>/files/vhdadjangoapi_8fjz47epc6' + '/Agenturdaten_' + str(standard.agency.pk) + '/</d:href><d:depth>infinity</d:depth></d:scope></d:from><d:where><d:gt><d:prop><oc:size/></d:prop><d:literal>1</d:literal></d:gt></d:where></d:basicsearch></d:searchrequest>'
|
filesearchdata = '<?xml version="1.0" encoding="UTF-8"?><d:searchrequest xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:basicsearch><d:select><d:prop><oc:fileid/></d:prop></d:select><d:from><d:scope><d:href>/files/vhdarootadmin_2cdme7ckw' + '/Agenturdaten_' + str(standard.agency.pk) + '/</d:href><d:depth>infinity</d:depth></d:scope></d:from><d:where><d:gt><d:prop><oc:size/></d:prop><d:literal>1</d:literal></d:gt></d:where></d:basicsearch></d:searchrequest>'
|
||||||
|
|
||||||
#filesearchdata = '<?xml version="1.0" encoding="UTF-8"?><d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:prop><oc:fileid /></d:prop><d:depth>infinity</d:depth></d:propfind>'
|
#filesearchdata = '<?xml version="1.0" encoding="UTF-8"?><d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:prop><oc:fileid /></d:prop><d:depth>infinity</d:depth></d:propfind>'
|
||||||
r = requests.request("SEARCH", settings.NEXTCLOUD_URL + "remote.php/dav/", data=filesearchdata, headers={'Content-Type' : 'text/xml', 'Authorization' : "Bearer " + request.user.profile.nc_sid})
|
r = requests.request("SEARCH", settings.NEXTCLOUD_URL + "remote.php/dav/", data=filesearchdata, headers={'Content-Type' : 'text/xml', 'Authorization' : "Bearer " + request.user.profile.nc_sid})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue