Re: Dexterity DataGridField Default Factory
espen <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.user |
|---|---|
| Message-ID | <[email protected]> |
A shot in the dark, probably:
Could you try to export some content and see how it is saved ?
(maybe it is possible to export the site as xml instead of zexp ) and have a look.
In case it could be of any help: ny registry settings exports like this:
<record name="medialog.lxml.interfaces.ILxmlSettings.scrape_url_pair" interface="medialog.lxml.interfaces.ILxmlSettings" field="scrape_url_pair">
<field type="plone.registry.field.List">
<title>scrape_url_pair</title>
</field>
<value>
<element>{'scrape_selector': '.test', 'scrape_base_url': 'http://vg.no'}</element>
</value>
</record>
———
PS: I never managed to import these settings in registry.xml (so you are not alone with not getting this to work)
Espen
4. mars 2015 kl. 19:28 skrev Simon Richardson-2 [via Plone] <ml-node+s293351n7573330h83-PKuAHvtXa09l57MIdRCFDg@public.gmane.org>:
> Tuple does get me further but now the default value fails validation in the innards of datafgridfield.row.
>
> I'm going to park this now
>
> Simon
> From: [hidden email]
> Sent: 03/03/2015 12:37
> To: [hidden email]
> Subject: RE: [Plone-Users] Dexterity DataGridField Default Factory
>
> Christian,
> I'll try that although I suspect it might fail because my array contains dicts and they don't have a hash value. I'll give it a go tonight and let you know.
> Simon
> From: [hidden email]
> Sent: 03/03/2015 10:42
> To: [hidden email]
> Subject: Re: [Plone-Users] Dexterity DataGridField Default Factory
>
> untested just of the top of my head: what happens if you return a tuple() ?
>
> On 2 March 2015 at 15:45, Simon Richardson <[hidden email]> wrote:
>
> > Hi Espen
> >
> > I haven't seen the issues:
> >
> > #33 I'll check the version is the latest and try again if not.
> >
> > #31 I have a vocabulary defined using a factory and it's working as
> > required. So I don't think this will be my problem.
> >
> > I believe I should return a list of dicts from my default factory (maybe
> > I'm wrong?), but I get the unhashable error for the list. It seems that
> > maybe a default can't be a list?
> >
> > ________________________________
> > From: espen
> > Sent: 02/03/2015 15:13
> > To: [hidden email]
> > Subject: Re: [Plone-Users] Dexterity DataGridField Default Factory
> >
> > be sure to use the latest version
> > https://github.com/collective/collective.z3cform.datagridfield/issues/33
> >
> > Also: did you see this:
> > https://github.com/collective/collective.z3cform.datagridfield/issues/31
> >
> >
> > 2. mars 2015 kl. 15:33 skrev Simon Richardson-2 [via Plone] <[hidden
> > email]>:
> >
> > Hi Plone users
> >
> > I'm unable to create a default factory for a datagridfield field, due to
> > running into a
> >
> > 'unhashable type: list' error
> >
> > Does anyone have an example of a datagridfield with a default value defined?
> >
> > Simon
> >
> > ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming The Go Parallel Website,
> > sponsored
> > by Intel and developed in partnership with Slashdot Media, is your hub for
> > all
> > things parallel software development, from weekly thought leadership blogs
> > to
> > news, videos, case studies, tutorials and more. Take a look and join the
> > conversation now. http://goparallel.sourceforge.net/
> > _______________________________________________
> > Plone-Users mailing list
> > <a href="x-msg://30/user/SendEmail.jtp?type=node&node=7573305&i=0"
> > target="_top" rel="nofollow" link="external">[hidden email]
> > https://lists.sourceforge.net/lists/listinfo/plone-users
> >
> >
> > ________________________________
> > If you reply to this email, your message will be added to the discussion
> > below:
> > http://plone.293351.n2.nabble.com/Dexterity-DataGridField-Default-Factory-tp7573305.html
> > To start a new topic under General Questions, email [hidden email]
> > To unsubscribe from Plone, click here.
> > NAML
> >
> >
> >
> > ________________________________
> > View this message in context: Re: Dexterity DataGridField Default Factory
> > Sent from the General Questions mailing list archive at Nabble.com.
> >
> > ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming The Go Parallel Website,
> > sponsored
> > by Intel and developed in partnership with Slashdot Media, is your hub for
> > all
> > things parallel software development, from weekly thought leadership blogs
> > to
> > news, videos, case studies, tutorials and more. Take a look and join the
> > conversation now. http://goparallel.sourceforge.net/
> > _______________________________________________
> > Plone-Users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/plone-users
> >
>
>
>
> --
> Best Regards,
>
> Christian Ledermann
>
> London - UK
> Mobile : +44 7474997517
>
> <*)))>{
>
> If you save the living environment, the biodiversity that we have left,
> you will also automatically save the physical environment, too. But If
> you only save the physical environment, you will ultimately lose both.
>
> 1) Don’t drive species to extinction
>
> 2) Don’t destroy a habitat that species rely on.
>
> 3) Don’t change the climate in ways that will result in the above.
>
> }<(((*>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Plone-Users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-users
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://plone.293351.n2.nabble.com/Dexterity-DataGridField-Default-Factory-tp7573305p7573330.html
> To start a new topic under General Questions, email ml-node+s293351n293352h65-PKuAHvtXa09l57MIdRCFDg@public.gmane.org
> To unsubscribe from Plone, click here.
> NAML
--
View this message in context: http://plone.293351.n2.nabble.com/Dexterity-DataGridField-Default-Factory-tp7573305p7573331.html
Sent from the General Questions mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Plone-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-users