Hello at all!

I'm trying to customize tgext.admin to the needs of my application:
Since I have some PickleType columns in my model that should only be filled 
by uploading plain files, I created the following form:

class TestEditForm(EditableForm):
    __model__ = Test
    __require_fields__     = ['type']
    __omit_fields__        = ['id', 'assignment_id']
    __field_order__        = ['assignment', 'type', 'visible', 'timeout', 
'argv', 'input', 'output']
    
    input = FileField(id='input', 
validator=FieldStorageUploadConverter(not_empty=False))
    output = 
FileField(id='output',validator=FieldStorageUploadConverter(not_empty=False))

which is included via

class TestCrudConfig(CrudRestControllerConfig):
    edit_form_type = TestEditForm

and

class MyAdminConfig(AdminConfig):
    test = TestCrudConfig

Now if there is already data in the input/output columns, it just gets 
overwritten with None if the file isn't uploaded again.

Am I missing a parameter to accomplish this non-overwriting behaviour?
Or could someone tell me some hackish way to achieve this!

Thanks a lot,
Moritz

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/turbogears/-/pgDiN4rGcP0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to