<% from merescoharvester.harvester.mapping import Mapping import os f = asform(input) code = str(f.code).replace('\r','') target(filepath(f.id + '.mapping')) %> <%=f.id%> <%escape_xml(f.name)%> <%escape_xml(f.description)%> <%escape_xml(code)%> <% error = '' if not f.name: error = 'Geen naam ingevoerd' else: datamap = Mapping(str(f.id)) datamap.code=code try: datamap.validate() except Exception, e: error = str(e) redirect(uri(path='/page/mapping.edit/'+f.id+'.mapping', query={'error':error, 'referrerDomain':f.referrerDomain})) %>