Django 1.4.x support for Firebird

95 views
Skip to first unread message

mariuz

unread,
Aug 2, 2012, 2:29:01 AM8/2/12
to django-d...@googlegroups.com
We need your opinions , patches ideas  


ps: yes we moved to github

Anssi Kääriäinen

unread,
Aug 2, 2012, 8:40:52 AM8/2/12
to Django developers
It seems there is need for "max decimal digits" feature or something
like that, so that one can skip the failing tests... Please file a
ticket.

- Anssi

On 2 elo, 09:29, mariuz <map...@gmail.com> wrote:
> We need your opinions , patches ideas
>
> https://groups.google.com/forum/?fromgroups#!topic/django-firebird-de...

Melvyn Sopacua

unread,
Aug 3, 2012, 7:15:53 AM8/3/12
to django-d...@googlegroups.com
On 2-8-2012 14:40, Anssi K��ri�inen wrote:
> It seems there is need for "max decimal digits" feature or something
> like that

Actually, what I'm interested in is that anything from a model field
definition that can apply to a form field (yes, that general) is added
to a form field's attributes of a ModelForm and passed on to the widget.
In addition, 'localize' should be supported on the model level as well
(and a translate attribute, but that's a larger can of worms).

The reason for it, is that it you can stick to creating widgets for a
specific field, instead of having to connect the entire model to widget
chain. For example, say I have an 'introduction' field in my model that
is a TextField(). The reason that it's a TextField is that 255
characters is too small and that requires me to use that field type.
However, I don't want the introduction to be any larger than 400
characters, so I set the max_length attribute on the model field to 400
and create a widget that uses JavaScript to limit the number of
characters. The problem is that I now do not have access to max_length
and need to subclass the form field and specify that form field on the
ModelForm.

So my approach would be to pass all these attributes on to ModelForm and
the widgets and for the default form fields simply ignore the attributes
you're not interested in.

I'm willing to come up with a patch if there is interest in this approach.
--
Melvyn Sopacua
Reply all
Reply to author
Forward
0 new messages