Permalink
Commits on Oct 1, 2012
  1. 79 chars

    mcdonc committed Oct 1, 2012
Commits on Sep 25, 2012
  1. - Add a ``set_pstruct`` methods to Field which accepts a pstruct

    mcdonc committed Sep 25, 2012
      and sets the cstruct related to the field to the deserialized value.
  2. - Add ``style`` attribute/arguments to textinput-related widgets allo…

    mcdonc committed Sep 25, 2012
    …wing you
    
      to set the style of the tag by hand.
  3. - Fixed bug wherein items added to a sequence nor the initial items r…

    mcdonc committed Sep 25, 2012
    …endered
    
      in a sequence would not reflect the correct defaults of the item widget.
      See Pylons#79
    
    Closes #79.
Commits on Sep 24, 2012
  1. coverage

    mcdonc committed Sep 24, 2012
  2. slightly better coverage

    mcdonc committed Sep 24, 2012
  3. get rid of render_widget, it's now logically the same as serialize. g…

    mcdonc committed Sep 24, 2012
    …arden changelog. fix a template name reference
  4. reverse previous decision to pass a mess-o-names into templates; get …

    mcdonc committed Sep 24, 2012
    …rid of dead chameleon 1 code
  5. - Deform now depends on Colander >= 0.9.9dev (previously it depended …

    mcdonc committed Sep 24, 2012
    …on >=
    
      0.8).  It requires Colander 0.9.9's newer ``cstruct_children`` and
      ``appstruct_children`` methods of schema objects as well as being able to
      import objects from Colander that don't exist in earlier versions.
    
    - Deform now depends on Chameleon >= 2.5.1 (previously it depended on
      >= 1.2.3).  It requires the Markup class supplied by this version or better.
    
    - Deform no longer has a setup_requires dependency on setuptools_git
      (useless, as the version on PyPI is broken).
    
    - The default widget for the colander.Money type is now
      deform.widgets.MoneyInputWidget.
    
    - Setup.py now includes all testing requirements in tests_require that are in
      testing extras and vice versa.
    
    - In support of "retail" form rendering, the ``serialize`` method of widgets
      now accepts arbitrary keyword arguments.  These are used as top-level value
      overrides to widget templates.
    
    - In support of "retail" form rendering, the ``serialize`` method of a Field
      now accepts arbitrary keyword arguments.  These are passed along to it's
      widget's ``serialize`` method.
    
    - Built-in widgets now pass more top-level names to their templates.
      Previously only two names were always passed to templates: ``field`` and
      ``cstruct``.  Those are still passed, but now many others are passed.  The
      top-level template rendering dictionary is created in the following way:
    
      - All non-method, non-dunder attributes of the widget (both its __dict__
        and its' class' __dict__ and any other attributes in the widget's mro)
        are scraped off the widget and turned into top-level names.  These are
        turned in to a dictionary.  One exception: ``template`` is omitted (it is
        used in method calls so it can't be a part of the dict).
    
      - The values ``field`` (representing the form field) and ``cstruct``
        (representing the cstruct value passed to the renderer) are added to the
        dictionary.  These replace any attributes that already exist in the
        dictionary.
    
      - The following attributes are scraped off the field and added to the
        dictionary: ``oid``, ``name``, ``description``, ``title``, and
        ``required``.  These replace any of the attributes that already exist in
        the dictionary.
    
      - An arbitrary set of key-value pairs passed to the widget's ``serialize``
        method are added to the dictionary.  These replace any values that
        already exist in the dictionary.
    
      The ultimate dictionary composed this way is used as the top-level
      dictionary passed to every template rendered by built-in widgets.  This
      feature is in support of "retail" form rendering.
    
    - Built-in templates have been changed to use top-level names where feasible
      instead of attributes of ``field`` and/or ``cstruct`` so their uses may be
      overridden by a caller to ``serialize``.  This is in support of "retail"
      form rendering.
    
    - Built-in widgets may have a 'readonly' attribute/constructor-argument, to
      indicate that a form field associated with the widget should use its
      readonly template instead of its normal readwrite template.  A ``readonly``
      keyword argument can still be passed to ``Field.serialize`` to render a
      field as readonly, like in older versions.
    
    - It is now possible to pass an ``appstruct`` argument to the
      ``deform.Field`` (and by extension, the ``deform.Form``) constructor.  When
      you do so, you can omit passing an ``appstruct`` argument to the ``render``
      method of the field/form.  Fields set a cstruct value recursively when
      supplied with an appstruct.  This is in support of "retail" form rendering.
    
    - Form/field objects are now initialized with a cstruct (recursively) when
      created.  This means that accessing form.cstruct will return the current
      set of rendering values.  This value is reset during validation, so after a
      validation is done you can re-render the form to show validation errors.
      This is in support of "retail" form rendering.
    
    - Form/field objects now have peppercorn-field-outputting methods:
      ``start_mapping``, ``end_mapping``, ``start_sequence``, ``end_sequence``,
      ``start_rename``, ``end_rename``.
  6. Merge pull request #125 from davidjb/master

    mcdonc committed Sep 24, 2012
    Expand on documentation about css_class for Button (+ fix documentation)
Commits on Sep 23, 2012
  1. Merge pull request #124 from iElectric/docs_fix

    mcdonc committed Sep 23, 2012
    Warn about Form.validate() mutating the form itself
  2. first cut at exposing and using 'retail' api for templating, currentl…

    mcdonc committed Sep 23, 2012
    …y requires feature.exposesub2 branch of colander, and has no additional tests
Commits on Sep 21, 2012
  1. - ``deform.field.Field.validate`` now accepts a ``subcontrol`` argume…

    mcdonc committed Sep 21, 2012
    …nt for
    
      validating a submapping of a form.
  2. reorder methods

    mcdonc committed Sep 21, 2012
  3. Merge pull request #112 from rbu/add-css-class-to-button

    kiorky committed Sep 21, 2012
    Add css_class to Button so it can be styled
Commits on Sep 19, 2012
  1. - ``deform.field.Field`` now has a ``__contains__`` method, which ret…

    mcdonc committed Sep 19, 2012
    …urns
    
      ``True`` if the named field is a subfield of the field on which it is
      called.
    
    - ``deform.field.Field`` now has a ``validate_pstruct`` method which works
      like ``validate`` except it accepts a pstruct directly instead of accepting
      a list of controls.
  2. denote return values

    mcdonc committed Sep 19, 2012
Commits on Sep 18, 2012
  1. added optional ``orderable=False`` kwarg to SequenceWidget

    sbrauer committed Sep 18, 2012
    if True, sequence items are reorderable with drag-and-drop
    (via jQuery UI Sortable)
Commits on Aug 30, 2012
  1. - Allow ``deform.form.Form`` constructor to accept an ``autocomplete``

    mcdonc committed Aug 30, 2012
      keyword argument, which controls the ``autocomplete`` attribute of the form
      tag.
Commits on Aug 25, 2012
Commits on Aug 24, 2012
Commits on Aug 23, 2012
  1. garden

    mcdonc committed Aug 23, 2012