Commit 10af7889 authored by Janez K's avatar Janez K
Browse files

popravek pri shranjevanju fajlov

parent 3518f085
......@@ -5,7 +5,7 @@ def odt_to_tab(request,input_dict,output_dict,widget):
import Orange
from mothra.settings import MEDIA_ROOT
from workflows.helpers import ensure_dir
destination = MEDIA_ROOT+str(request.user.id)+'/'+str(widget.id)+'.tab'
destination = MEDIA_ROOT+'/'+str(request.user.id)+'/'+str(widget.id)+'.tab'
ensure_dir(destination)
input_dict['data'].save(destination)
filename = str(request.user.id)+'/'+str(widget.id)+'.tab'
......@@ -16,7 +16,7 @@ def odt_to_csv(request,input_dict,output_dict,widget):
import Orange
from mothra.settings import MEDIA_ROOT
from workflows.helpers import ensure_dir
destination = MEDIA_ROOT+str(request.user.id)+'/'+str(widget.id)+'.csv'
destination = MEDIA_ROOT+'/'+str(request.user.id)+'/'+str(widget.id)+'.csv'
ensure_dir(destination)
input_dict['data'].save(destination)
filename = str(request.user.id)+'/'+str(widget.id)+'.csv'
......@@ -27,7 +27,7 @@ def odt_to_arff(request,input_dict,output_dict,widget):
import Orange
from mothra.settings import MEDIA_ROOT
from workflows.helpers import ensure_dir
destination = MEDIA_ROOT+str(request.user.id)+'/'+str(widget.id)+'.arff'
destination = MEDIA_ROOT+'/'+str(request.user.id)+'/'+str(widget.id)+'.arff'
ensure_dir(destination)
input_dict['data'].save(destination)
filename = str(request.user.id)+'/'+str(widget.id)+'.arff'
......@@ -37,7 +37,7 @@ def odt_to_arff(request,input_dict,output_dict,widget):
def string_to_file(request,input_dict,output_dict,widget):
from mothra.settings import MEDIA_ROOT
from workflows.helpers import ensure_dir
destination = MEDIA_ROOT+str(request.user.id)+'/'+str(widget.id)+'.txt'
destination = MEDIA_ROOT+'/'+str(request.user.id)+'/'+str(widget.id)+'.txt'
ensure_dir(destination)
f = open(destination,'w')
f.write(str(input_dict['string']))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment