New patch posted, comments?
On Jan 12, 2:13 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Added a patch that uses the takes_initial approach. The tests pass.
> Just want this in quick ;)
>
> On Jan 11, 4:14 am, Brian Rosner <[EMAIL PROTECTED]> wrote:
>
> > On 2008-01-10 17:34:11 -0700, Malcolm Tredinnick
> > <[EMAIL PROTECTED]> said:
>
> > > On Thu, 2008-01-10 at 02:12 -0800,
> > > [EMAIL PROTECTED] wrote:
> > >> Looked at the latest patch, great stuff.
>
> > >> About other fields needing initial data, what about havig a commom
> > >> baseclass (for use with isinstance) for those fields or a
> > >> takes_initial attribute so it is not only specific to filefields.
>
> > > Why is this needed? How many other fields are there that are represented
> > > by an HTML widget which does not allow setting of the initial value?
> > > That is the only case that seems to require this handling. So if there's
> > > another case unrelated to the HTML file upload widget which requires
> > > this, we may have a reason to generalise, otherwise it's not going to be
> > > required. It's not worth over-generalising just because we can; we do it
> > > because we need to.
>
> > To my knowledge there are none. However, there are two fields that may
> > contain a FileField or ImageField. ComboField and MultiValueField would
> > need to just pass initial through to the clean method of the FileField.
> > So a type check needs to be in place for the FileField there as well as
> > either extending the type check in full_clean to include both
> > ComboField and MultiValueField or use an takes_initial attribute on the
> > class. The takes_initial approach may still be overkill for two more
> > fields, but it would allow users to create some crazy other field that
> > needs initial or needs to pass it through.
>
> > --
> > Brian Rosnerhttp://oebfare.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---