Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install plone.formwidget.querystring

How to install plone.formwidget.querystring

  1. Download and install ActivePython
  2. Buy and install the Business Edition license from account.activestate.com
  3. Open Command Prompt
  4. Type pypm install plone.formwidget.querystring

plone.formwidget.querystring contains builds that are only available via PyPM when you have a current ActivePython Business Edition subscription.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0b2
1.0b2 Available View build log
1.0a1 Available View build log
Windows (64-bit)
1.0b2
1.0b2 Available View build log
1.0a1 Available View build log
Mac OS X (10.5+)
1.0b2
1.0b2 Available View build log
1.0a1 Available View build log
Linux (32-bit)
1.0b2
1.0b2 Available View build log
1.0a1 Available View build log
Linux (64-bit)
1.0b2
1.0b2 Available View build log
1.0a1 Available View build log
 
License
GPL

Introduction

A z3c.form-based widget for composing a Query string/search.

This widget is used by the contentlisting tile and the dexterity-based version of plone.app.collection (>2.0), to make selections, and 'build' your query. It stores a list of dictionaries containing the query you've build. This query is being parsed by using plone.app.collection and that used plone.app.contentlisting to display the results in the tile.

Installation

If you install plone.formwidget.querystring, you probably want to use it in an add-on product for Plone. Therefore you can add it to the setup.py of your package:

install_requires=[
    'plone.formwidget.querystring',
    ...
],

You probably want to also use it to the list of dependencies in your generic setup profile (profiles/default/metadata.xml):

<metadata>
  <version>1</version>
  <dependencies>
    <dependency>profile-plone.formwidget.querystring:default</dependency>
  </dependencies>
</metadata>

Dexterity Widget

To assign the plone.formwidget.querystring widget to a field in your custom content type, you can use a plone.autoform directive in the interfaces definition (interfaces.py):

from plone.formwidget.querystring.widget import QueryStringFieldWidget


class IMyDexteritySchema(form.Schema):

    form.widget(query=QueryStringFieldWidget)
    query = schema.List(
        title=_(u'label_query', default=u'Search terms'),
        description=_(u"""Define the search terms for the items you want to
            list by choosing what to match on.
            The list of results will be dynamically updated"""),
        value_type=schema.Dict(value_type=schema.Field(),
                               key_type=schema.TextLine()),
        required=False
        )

Credits

  • Kim Chee Leong
  • Ralph Jacobs
  • Jonas Baumann
  • Hanno Schlichting
  • Timo Stollenwerk

Changelog

1.0b3 (2013-02-04)
  • Fixed context for getting ajax results [kroman0]
  • Fixed conditional initialization of querywidget, see http://dev.plone.org/ticket/12529 [kroman0]
  • The widget can now be hidden, when clicking on the window or the widget. The event is only effective when the widget is displayed. [bosim]
  • Translations are now in Plone domain [bosim]
  • Made the widget a bit more resistent to missing entries, i.e. vocabularies or in other way indexes. The problem occur if an option is deleted from the registry but not deleted from the collections in before hand. [bosim]
  • Update import path for pagetemplate. Now only works with 4.1 and higher [do3cc]
1.0b2 (2012-03-19)
  • Fix sort-reversed checkbox javascript. [timo]
  • Move docs/HISTORY.txt to CHANGES.txt to apply to Plone conventions. [timo]
1.0b1 (2012-03-09)
  • Stop hardcoding the field name so it works with other field names and prefixes. [davisagli]
  • Rename ArcheTypesQueryWidget to Querywidget to avoid confusion. [timo]
  • Several JSLint fixes on querywidget.js [timo]
  • Make sure the sorting settings are actually stored on the collection. [timo]
1.0a1 (2011-10-28)
  • Initial release. [ralphjacobs, kcleong, jbaumann, hannosch, timo]

Subscribe to package updates

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.