web/views/edit_attributes.pt
author Julien Cristau <julien.cristau@logilab.fr>
Tue, 18 Feb 2014 17:58:45 +0100
changeset 9556 12ee310541bb
parent 0 b97547f5f1fa
permissions -rw-r--r--
[server/migractions] finish migration to repoapi objects Changeset 241b1232ed7f (Use repoapi instead of dbapi for cwctl shell, upgrade and db-init) only did half of the job. It left the migration handler with both a session (cubicweb.server.session.Session) and a cnx (cubicweb.repoapi.ClientConnection) attribute with different ideas of what Connection they were talking to. With this change, we: - make the caller responsible of disabling security on the Connection if it wants to - turn mih.session into an actual attribute, set on __init__ - same for cnx (the client connection) - drop the "lazy connection" logic, and establish the connection up-front - always go through the connection instead of the session when we need to talk to the db

  <table class="attributeForm" style="width:100%;"
	 tal:attributes="id tab_id | nothing;
			 class tab_class | nothing;">
    <tr tal:iter="widget lines">
      <th class="labelCol" tal:content="structure python:widget.render_label(entity)">attrname</th>
      <td tal:define="error python:widget.render_error(entity)" style="width:100%;"
          tal:attributes="class python:error and 'error' or nothing">
	<div tal:replace="structure error">error message if any</div>
	<div tal:replace="structure python:widget.edit_render(entity)" >widget (input, textarea, etc.)</div>
	<div tal:replace="structure python:widget.render_help(entity)">format help if any</div>
      </td>
    </tr>
  </table>