Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    zeam.form.autofields 1.0.1

    Download button

    No screenshots available
    Downloads: 92  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Sylvain Viollon | More programs
    BSD License / FREE
    May 3rd, 2012, 17:29 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    zeam.form.autofields description

    Automatically collect fields for a Zeam Form

    zeam.form.autofields is a package able to collect fields definition for your form. This enable you to create forms with a plugable list of fields.

    Example

    You need first to define a group of fields. This will be just an interface:

    >>> from zope.interface import Interface

    >>> class IReplyFields(Interface):
    ... pass


    Now you can define groups of fields:

    >>> from zeam.form import base, autofields


    >>> class ReplyInformation(autofields.AutoFields):
    ... autofields.group(IReplyFields)
    ... autofields.order(0)
    ... fields = base.Fields(base.Field('Comment'))

    >>> class ReplyBlogInformation(autofields.AutoFields):
    ... autofields.group(IReplyFields)
    ... autofields.order(10)
    ... fields = base.Fields(base.Field('Blog URL'))


    And you will be able to use those fields on your form somewhere else:

    >>> class ReplyForm(base.Form):
    ... fields = autofields.FieldsCollector(IReplyFields)


    API

    In addition to its API, zeam.form.autofields export the one of zeam.form.base.

    Classes

    AutoFields
     Base classes used to define a group of Fields to be included in a form.

    Directives

    group
     Directive used on AutoFields which select for which group you whish to provide the fields for. A group is just a plain zope interface, that will be given as parameter to the FieldsCollector.
    view
     Directive used on AutoFields that will let you specify for which Form (or view) you whish to provide the fields for. This directive is not required, and default to IBrowserView.
    order
     Optional directive which let decide in wich order the fields will included at the end.

    Properties

    FieldsCollector
     Property used to collect form Fields for you.


    Product's homepage

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · Update to use the latest version of grokcore.component.

      


    TAGS:

    Zeam Form | collect fields | fields definition | Zeam | Form | collect

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM