Metadata-Version: 1.1
Name: cubicweb-relationwidget
Version: 0.1.0
Summary: Provide a generic and ergonomic relation widget
Home-page: http://www.cubicweb.org/project/cubicweb-relationwidget
Author: LOGILAB S.A. (Paris, FRANCE)
Author-email: contact@logilab.fr
License: LGPL
Description: Summary
        -------
        
        Provide a generic and ergonomic relation widget
        
        How to use it
        ~~~~~~~~~~~~~
        
        Add the widget in your `uicfg.py` file via uicfg configuration tool.
        
        If you are using `cubicweb.web.uihelper.FormConfig`::
        
            from cubicweb.web import uihelper
            from cubes.relationwidget.views import RelationFacetWidget
        
            class MyEntityConfing(uihelper.FormConfig):
                  etype = 'MyEntity'
                  rels_as_attrs = ('my_relation', )  # edit the relation as attribut
                  widgets = dict(
                      my_relation=RelationFacetWidget, # use the RelationFacetWidget for `my_relation`
                  )
        
        You can also use it directely via `uicfg.autoform_field_kwarg`::
        
            from cubicweb.web.views import uicfg
            from cubes.relationwidget.views import RelationFacetWidget
        
            # edit the relation as attribute.
            uicfg.autoform_section.tag_subject_of(('MyEntity', 'my_relation', '*'),
                                                   formtype=('main', 'muledit'),
                                                   section='attributes')
        
            # add the RelationFacetWidget for `my_relation`
            uicfg.autoform_field_kwargs.tag_subject_of(('MyEntity', 'my_relation', '*'),
                                                       {'widget': RelationFacetWidget})
        
        
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: CubicWeb
Classifier: Programming Language :: Python
Classifier: Programming Language :: JavaScript
