On 11/16/06, SmileyChris <[EMAIL PROTECTED]> wrote:
> It seems like a great opportunity as newforms develops to clean up the
> database fields mess. Most of the arguments you pass a database field
> are not related to the database.
>
> Is this part of the goal of newforms, or am I thinking too big?
You're thinking a bit too big. :)
The goal isn't to remove metadata from models. High-level concepts,
such as EmailField and validators on a particular model field, are not
going away. This is a key philosophy -- models store a deeper level of
metadata than simply their database column metadata.
However, one goal I've had for newforms *is* to let developers
manually specify/override the form Field used for any particular
database Field in the admin site. I think this could be achieved with
a hook in the "class Admin". Something like this, maybe --
class Admin:
field_overrides = {
'first_name': CharField(widget=PasswordInput),
}
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.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
-~----------~----~----~----~------~----~------~--~---