Changeset 2336 for WAeUP_SRP/base


Ignore:
Timestamp:
9 Oct 2007, 17:55:37 (17 years ago)
Author:
joachim
Message:

export Images to fs on demand can be used on live-system after creating images directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Widgets.py

    r2335 r2336  
    18651865        widget_id = self.getWidgetId()
    18661866        file_name = datamodel[self.fields[0]]
    1867         #import pdb; pdb.set_trace()
     1867        if self.id_field == "":
     1868            student_id = self.getStudentId()
     1869        else:
     1870            student_id = datastructure[self.id_field]
     1871        student_path = os.path.join(self.storage_path,student_id)
     1872        if not os.path.exists(student_path):
     1873            self.waeup_tool.moveImagesToFS(student_id)
    18681874        if self.allow_resize:
    18691875            datastructure[self.getWidgetId() + '_resize'] = ''
     
    19581964            if mimetype is not None:
    19591965                mimetype = str(mimetype) # normalize
    1960             #import pdb; pdb.set_trace()
    19611966            file = self.makeFile(filename, fileupload, datastructure)
    19621967            # Fixup mimetype
Note: See TracChangeset for help on using the changeset viewer.