# HG changeset patch # User Sandrine Ribeau # Date 1239380973 25200 # Node ID 2452e660aea6f8ee4970f60474d8e279744adf97 # Parent 28bb9efe0cc84d700f461829ec09eaef3e1e8da0# Parent 0d63ee3096f6c3983a163246531b35fc790950a7 merge diff -r 28bb9efe0cc8 -r 2452e660aea6 doc/book/en/B1022-views-stdlib.en.txt --- a/doc/book/en/B1022-views-stdlib.en.txt Fri Apr 10 09:27:31 2009 -0700 +++ b/doc/book/en/B1022-views-stdlib.en.txt Fri Apr 10 09:29:33 2009 -0700 @@ -3,8 +3,8 @@ Predefined views in the library ``````````````````````````````` -`CubicWeb` provides a lot of standard views for the default class -`EntityType`. You can find them in ``cubicweb/web/views/``. +`CubicWeb` provides a lot of standard views. You can find them in +``cubicweb/web/views/``. A certain number of views are used to build the web interface, which apply to one or more entities. Their identifier is what distinguish them from @@ -60,7 +60,8 @@ This view displays usually a side box of some related entities in a primary view. -Start view: + +Start view (e.g. views that don't apply to a result set): *index* This view defines the home page of your application. It does not require diff -r 28bb9efe0cc8 -r 2452e660aea6 web/views/management.py --- a/web/views/management.py Fri Apr 10 09:27:31 2009 -0700 +++ b/web/views/management.py Fri Apr 10 09:29:33 2009 -0700 @@ -159,9 +159,11 @@ w(u'%s%s%s \n' % (_("name"), _("label"), _('granted to groups'))) if getattr(entity, '__permissions__', None): + # vocabfunc must be compliant with StaticVocabularyConstraint.vocabulary + # which takes only keyword parameters wdg = StaticComboBoxWidget(self.vreg, self.schema['EPermission'], self.schema['name'], self.schema['String'], - vocabfunc=lambda x: entity.__permissions__) + vocabfunc=lambda entity, x=entity: x.__permissions__) else: wdg = newperm.get_widget('name') w(u'%s\n' % wdg.edit_render(newperm))