get to post
This commit is contained in:
parent
52f8b9445d
commit
5f638c1701
|
|
@ -241,11 +241,7 @@
|
||||||
var ncfiledata = [];
|
var ncfiledata = [];
|
||||||
//Anlegen der Standarddateien
|
//Anlegen der Standarddateien
|
||||||
function rebuildingStandards(id){
|
function rebuildingStandards(id){
|
||||||
console.log("NCFILEDATA BEFORE RESET");
|
|
||||||
console.log(ncfiledata);
|
|
||||||
ncfiledata.splice(0, ncfiledata.length);
|
ncfiledata.splice(0, ncfiledata.length);
|
||||||
console.log("NCFILEDATA RESET");
|
|
||||||
console.log(ncfiledata);
|
|
||||||
$("#cloud_process_standards").show();
|
$("#cloud_process_standards").show();
|
||||||
ncfiledata[0] = ['standardid', id];
|
ncfiledata[0] = ['standardid', id];
|
||||||
console.log("LOADING NC FILES");
|
console.log("LOADING NC FILES");
|
||||||
|
|
@ -263,6 +259,7 @@
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{% url 'api:apiswitchstandards' %}",
|
url: "{% url 'api:apiswitchstandards' %}",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
|
type: "POST",
|
||||||
data: JSON.stringify(ncfiledata),
|
data: JSON.stringify(ncfiledata),
|
||||||
success: function(data){
|
success: function(data){
|
||||||
if(data['status'] == "OK"){
|
if(data['status'] == "OK"){
|
||||||
|
|
|
||||||
|
|
@ -437,12 +437,12 @@ def getFileIdFromXML(xmlresponse):
|
||||||
Pro Datei in addedfiles wird ein neues NCFile-Objekt erstellt und in addedfiles_nc gespeichert. In den Ansichten der Standards werden dann nur noch die addedfiles_nc-Elemente gesehen und verändert.
|
Pro Datei in addedfiles wird ein neues NCFile-Objekt erstellt und in addedfiles_nc gespeichert. In den Ansichten der Standards werden dann nur noch die addedfiles_nc-Elemente gesehen und verändert.
|
||||||
'''
|
'''
|
||||||
import re, json
|
import re, json
|
||||||
@api_view(['GET'], )
|
@api_view(['POST'], )
|
||||||
def NCSwitchStandardFiles(request):
|
def NCSwitchStandardFiles(request):
|
||||||
if request.method == "GET":
|
if request.method == "POST":
|
||||||
|
|
||||||
#agency = Agency.objects.get(pk=request.GET.get('agencyid'))
|
#agency = Agency.objects.get(pk=request.GET.get('agencyid'))
|
||||||
jsonresponse = json.dumps(request.GET)
|
jsonresponse = json.dumps(request.POST)
|
||||||
json_final = json.loads(jsonresponse)
|
json_final = json.loads(jsonresponse)
|
||||||
standardid = False
|
standardid = False
|
||||||
ncfiledata = False
|
ncfiledata = False
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue