[ckan-dev] new extra-field

Sean Hammond sean.hammond at okfn.org
Thu Oct 4 16:30:15 UTC 2012


Can you post the full Python traceback?

I'm not sure if you should have '__extras': [ignore] in your schema, and
also your schema should be based on default_package_schema or
default_group_schema (see how it's done in the example I linked to)

On Thu, Oct 04, 2012 at 11:15:17AM +0200, Crossbreed wrote:
> <html><body><div>Hi!</div>
> <div> </div>
> <div>Thank you!<br /><br />I don't know why, but with the following schema I get an "Integrity Error". How could I fix it?<br /><br /><br />form_to_db_schema:<br />            'education': {<br />                'id': [convert_to_extras, ignore_missing, unicode],<br />                '__extras': [ignore],<br />            },<br /><br />db_to_form_schema:            <br /><br />    'education': {<br />                'id': [convert_from_extras, ignore_missing, unicode],<br />        &nbs
>  p;       '__extras': [ignore],<br />            },<br /><br /><br />In the form-file:<br /><br /><br /> <div class="control-group education-field"><br />    <label class="control-label-required" for="education_id">Education<em class="star">*</em></label><br />    <div class="controls"><br />         <py:with vars="educations=data.get('education',[])"><br />      <strong py:if="len(educations)>0">Member of:</strong><br />      <py:for each="num, edu in enumerate(educations)"><br /> <br />        <div class="checkbox" py:if="'id' in edu"><br 
>  />          <input type="checkbox" name="educations__${num}__id" checked="checked" value="${edu['id']}"/><br />          <label for="educations__${num}__checked">${edu.get('id', '')}</label><br />        </div><br />      </py:for><br /><br />      <select class="short" id="educations" name="educations"><br />      <option selected="selected" value="">(None)</option><br />        <py:for each="edu_desc, edu_id in c.educations"><br />          <option value="${edu_id}" ><br />    &
>  nbsp;       ${edu_desc}            <br />          </option><br />        </py:for><br />      </select><br /><br />       </py:with><br />    </div><br />  </div></div><br/><br/><hr/>Schau dir gleich die Seite von hsdf an! <a href="http://my.sms.at/crossbreed/" target="profil_sms_at">http://my.sms.at/crossbreed/</a><br/><hr/>Dein Eventkalender auf sms.at! Events anlegen, Freunde einladen & kein Top-Event mehr verpassen! <a href="http://www.sms.at/events/">http://www.sms.at/events/</a><br/></body></html>




More information about the ckan-dev mailing list