source: WAeUP_SRP/trunk/skins/waeup_default/import.py @ 2140

Last change on this file since 2140 was 1774, checked in by joachim, 17 years ago

add importEdit (untested)

  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1##parameters=REQUEST
2# $Id: import.py 1774 2007-05-11 15:33:54Z joachim $
3"""
4process the Application Form
5return html renderer + psm
6"""
7import DateTime
8from urllib import urlencode
9current = DateTime.DateTime()
10pr = context.portal_registration
11
12validate = REQUEST.has_key("import")
13
14lt = context.portal_layouts
15#pr = context.portal_registration
16
17res,psm,ds = lt.renderLayout(layout_id= 'import',
18                      schema_id= 'import',
19                      context=context,
20                      mapping=validate and REQUEST,
21                      ob={},
22                      layout_mode='create',
23                      commit=False,
24                      )
25if psm == 'invalid':
26    return context.import_form(rendered = res,
27                               psm = "Please correct your input!",
28                               ds = ds,
29                              )
30elif psm == '':
31    return context.import_form(rendered = res,
32                               psm = None,
33                               ds = ds,
34                              )
35elif psm == 'valid':
36    pass
37psm = context.waeup_tool.importData(ds.get('filename'),
38                                    ds.get('name'),
39                                    ds.get('import_or_edit')
40                                   )
41return context.import_form(rendered = res,
42                                 psm = psm,
43                                 ds = ds,
44                                 )
Note: See TracBrowser for help on using the repository browser.