On Sat, 2007-07-14 at 21:15 -0700, David S. wrote: > I am using the newforms-admin branch, which is really great. But I > realized I still have admin specific fields options in my model, e.g. > blank, choices. I am wondering where they really belong.
Those aren't admin-specific, since they are also tied in some ways to the validation of the data. For example, a field with blank=False (either explicitly given, or implied as the default) is not valid if you don't put a value in there before trying to save it. That constraint is true whether you put data into the field through the admin interface, through a form or just poking into the attribute in your code somewhere. Now, it happens that we don't exploit this directly too much at the moment, since models don't have fully implemented validation. That's something we're actively working on and will be done before 1.0, certainly. Semantically, though, blank and choices are data constraints, not purely admin features, so having them on the model fields is correct. The only purely presentation-related wart I can think of that is still in field attributes is the odd radio_choice option. Regards, Malcolm -- Tolkien is hobbit-forming. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---

