On 3/14/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 3/13/06, limodou <[EMAIL PROTECTED]> wrote: > > In most cases we do not do anything alone use model, but always there > > is a ui layer, such as gui or web. They have to do any such thing. > > There should be the ability to generate an HTML form for > creating/changing an instance of a model, yes, but that code doesn't > necessarily have to be what's doing the validation.
Maybe or maybe not. What django has implemented is exactly as what I said, I think the ways is good. And I remember there was a discussion about js invalidation, why we need this. Because we want to make mistakes can be found early, but not until the data will be saved. Validation can be implemented at different layer, but why the last layer? > > > And the model can only handle field themself. In some cases, we also > > need more time to deal with increased logic, particularly the > > relationship between the model, such things as users and conditions, > > and These things can not be accomplished only by models. > > Sure they can. Imagine explaining Django to someone who's never seen > an MVC model before; if you told them "the model is where you provide > all the information about a class of objects, and describe how it > works", they'd be awfully confused if you then said, "oh, except for > this and this and this, which have to be specified somewhere else." I think this is not a reason. Can we make this design is to promote a model to others can do many things? This is a good design? > > Better to have all the information about a class of objects, including > whatever information is needed to validate it, all in one place. > As what I said, Validation can be implemented at different layer, but why the last layer? -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
