Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(8)  |  Derive(0)  |  Import(3)

src/a/r/archetypes.searchwidget-0.1.8/src/archetypes/searchwidget/search.py   archetypes.searchwidget(Download)
from archetypes.searchwidget.interfaces import ISearchFormWithTags
from archetypes.searchwidget.interfaces import ISearchWidgetProvider
from archetypes.searchwidget import MessageFactory as _
 
 
class SearchTagsForTypeForm(Form):
    label = _('Tags')
    portal_type = None
    result_data = []
    ignoreContext = True
class SearchImages(SimpleSearch):
    implements(ISearchWidgetProvider)
    form = copy(SearchTagsForTypeForm)
    form.label = _(u'Images')
    form.portal_type = 'Image'
class SearchFiles(SimpleSearch):
    implements(ISearchWidgetProvider)
    form = copy(SearchTagsForTypeForm)
    form.label = _(u'Files')
    form.portal_type = 'File'
class SearchDocuments(SimpleSearch):
    implements(ISearchWidgetProvider)
    form = copy(SearchTagsForTypeForm)
    form.label = _(u'Documents')
    form.portal_type = ['Document', 'News item', 'Event']

src/a/r/archetypes.searchwidget-0.1.8/src/archetypes/searchwidget/interfaces.py   archetypes.searchwidget(Download)
 
from zope.interface import Interface
from zope.schema import TextLine, Set, Choice
from collective.searchtool.interfaces import ISearchProvider
from archetypes.searchwidget import MessageFactory as _
class ISearchFormWithTags(Interface):
 
    search_term = TextLine(
        required = False,
        title = _(u'Search term'))
    tags = Choice(
        required = False,
        title = _(u'Tags'),

src/a/r/archetypes.searchwidget-0.1.8/src/archetypes/searchwidget/widget.py   archetypes.searchwidget(Download)
 
from collective.searchtool.interfaces import ISearchProvider
from archetypes.searchwidget import MessageFactory as _
 
 
 
registerWidget(SearchWidget,
               title=_('Search Reference'),
               description=(_('Search for references.')),
               used_for=('Products.Archetypes.Field.ReferenceField',))