Git Product home page Git Product logo

plone.formwidget.querystring's Introduction

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

plone.formwidget.querystring's People

Contributors

mauritsvanrees avatar bosim avatar tisto avatar ralphjacobs avatar jensens avatar esteele avatar tmog avatar bsuttor avatar gforcada avatar kroman0 avatar bogdangi avatar davisagli avatar djay avatar naro avatar saily avatar do3cc avatar petschki avatar rnixx avatar garbas avatar vangheem avatar

Watchers

Corina Riba avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.