step adder work in progress
This commit is contained in:
@@ -2974,8 +2974,6 @@ def stepadder(request, id=0):
|
||||
)
|
||||
ps = get_object_or_404(PlannedSession, pk=id)
|
||||
|
||||
print(request.method,'aap')
|
||||
|
||||
if request.method != 'POST':
|
||||
message = {'status': 'false',
|
||||
'message': 'this view cannot be accessed through GET'}
|
||||
@@ -2996,7 +2994,17 @@ def stepadder(request, id=0):
|
||||
'message': 'permission denied for host '+hostt[0]}
|
||||
return JSONResponse(status=403, data=message)
|
||||
|
||||
print(post_data)
|
||||
steps = {
|
||||
"filename": "",
|
||||
}
|
||||
for id in post_data:
|
||||
try:
|
||||
step = PlannedSessionStep.objects.get(id=int(id))
|
||||
print(step.name)
|
||||
# add JSON
|
||||
except PlannedSessionStep.DoesNotExist:
|
||||
print('fail')
|
||||
pass
|
||||
|
||||
return JSONResponse(status=200,data=post_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user