<% from slowfoot import binderytools f = asform(input) name = f.name domain = xml if name == '': redirect('/page/domain.edit/' + domain.domain.id + '.domain?error=No%20name%20given.') else: targetid = uuid() new_target = binderytools.bind_string("%s"%targetid).targetId domain.domain.xml_append(new_target) target(filepath(domain.domain.id + '.domain')) req.write(domain.xml()) target(filepath(targetid + ".target")) %> <%=targetid%> <%escape_xml(name)%> <%=f.targetType%> <% redirect(uri(path='/page/target.edit/' + targetid + '.target', query={'referrerDomain':domain.domain.id})) # %>