guess this has something to do with how i define the table
i would guess this line does not work
Field('parent', 'reference plugin_webfolder_files', default=0,
requires = IS_IN_DB(db,'plugin_webfolder_files.id','%(name)s'))
you can exchange it with
Field('parent', 'integer', default=0, requires = IS_IN_DB
(db,'plugin_webfolder_files.id','%(name)s'))

a web2py expert should look into this since it should work i guess

On Jan 29, 1:48 pm, leone <handja...@gmail.com> wrote:
> Using postgres i debug
> IntegrityError: insert or update on table "plugin_webfolder_files"
> violates foreign key constraint "plugin_webfolder_files_parent_fkey"
> DETAIL:  Key (parent)=(0) is not present in table
> "plugin_webfolder_files".
> Have you a suggest?
>
> On 29 Gen, 10:38, selecta <gr...@delarue-berlin.de> wrote:
>
>
>
> > Here is a webfolder plug-in. It is still quite 
> > raw.http://jaguar.biologie.hu-berlin.de/~fkrause/web2py.plugin.webfolder.w2p
> > Feel free to use and improve it.
>
> > It depends on an improved IS_IN_SET validator. To use the plug-in you
> > need to replace the constructor of IS_IN_SET (gluon/validators.py)
> > with
>
> > def __init__(
> >         self,
> >         theset,
> >         labels=None,
> >         error_message='value not allowed',
> >         multiple=False,
> >         zero='',
> >         sort=False,
> >         ):
> >         self.multiple = multiple
> >         self.labels = labels
> >         if theset and (isinstance(theset[0], list) or isinstance(theset
> > [0], tuple)) and len(theset[0])==2:
> >             self.theset = [str(item) for item,label in theset]
> >             self.labels = [str(label) for item,label in theset]
> >         else:
> >             self.theset = [str(item) for item in theset]
> >         if isinstance(theset, dict):
> >             self.labels = theset.values()
> >         self.error_message = error_message
> >         self.zero = zero
> >         self.sort = sort

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to