Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1715 (closed enhancement: fixed)

Opened 11 years ago

Last modified 11 years ago

Ability to define widget default value as callable function.

Reported by: ondrejj Owned by: anonymous
Priority: normal Milestone: 1.5
Component: TG Widgets Version:
Severity: normal Keywords:


When defining widgets, it's not possible to define default value for new forms. For example there are 2 possible usages now:

  1. for password field define by default a random passwords, when adding
     new records. Even if it is possible to change this later, it is nicer
     and easy to define it immediately in widget definition.
  2. set default based on identity of logged user. When filling a value,
     who is the admin of this record, I mostly need to define myself (loggedd
     user). If default will be callable, Its easy to set.

There are many of other usages for callable defaults. It's easy to patch current stable release with callable defaults (patch added to this bug).


callable.patch Download (374 bytes) - added by ondrejj 11 years ago.
Mentioned patch.

Change History

Changed 11 years ago by ondrejj

Mentioned patch.

comment:1 Changed 11 years ago by Chris Arndt

  • Status changed from new to closed
  • Resolution set to fixed

This has been already implemented in r4499 for the 1.0 and 1.1 branch with proper tests and all. Closing this ticket as fixed.

Note: See TracTickets for help on using tickets.