Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.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]

Metadata

Release files for plone.formwidget.querystring 1.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plone.formwidget.querystring 1.0b2
File Size Uploaded
plone.formwidget.querystring-1.0b2.zip 19.3 kB Details

Release files / plone.formwidget.querystring-1.0b2.zip

Download URL plone.formwidget.querystring-1.0b2.zip
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4f27dee95c2f9708fca8bcc9ac5e36113c64ef1f56f4b860fbbd018e05b3dd37
BLAKE2b-256 checksum
How to use checksums
19ebeacd87268bee9096ac2dd0620b126b2708f866febdeb8f6aaef4e0dfbd9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page