Re: Moving all validation into the model layer.

2010-02-22 Thread James Bennett
On Thu, Feb 18, 2010 at 3:30 PM, orokusaki wrote: > I have thought for a year, pertaining to Django, about one thing: Why > doesn't validation propagate from the lowest level? Why should this > have to take place at a higher level? What happens with I want to do > things without using forms? Then,

Re: Moving all validation into the model layer.

2010-02-22 Thread Jacob Kaplan-Moss
On Mon, Feb 22, 2010 at 11:42 AM, orokusaki wrote: > Ah, Thanks Russell. I'm new to Django Dev stuff and wasn't aware that > they don't do features for the next version and bugs for the current > beta. That makes more sense though. You'll probably want to read through our "how to contribute to Dj

Re: Moving all validation into the model layer.

2010-02-22 Thread orokusaki
Ah, Thanks Russell. I'm new to Django Dev stuff and wasn't aware that they don't do features for the next version and bugs for the current beta. That makes more sense though. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this g

Re: Moving all validation into the model layer.

2010-02-21 Thread Russell Keith-Magee
On Mon, Feb 22, 2010 at 7:15 AM, orokusaki wrote: > Does anyone have interest in this? 1) Possibly. There are some complications to what you proposed. Model Validation has a lot of history, and things are they way they are for a reason -- and often, that reason is backwards compatibility. Propos

Re: Moving all validation into the model layer.

2010-02-21 Thread Chuck Harmston
Unless I misunderstand what you're looking for, the link Brett provided explains that this is a feature that is coming to Django. Some useful links: The original ticket: http://code.djangoproject.com/ticket/6845 The patch: http://code.djangoproject.com/changeset/12098 The branch: http://code.djang

Re: Moving all validation into the model layer.

2010-02-21 Thread orokusaki
Does anyone have interest in this? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googleg

Re: Moving all validation into the model layer.

2010-02-18 Thread orokusaki
@BrettH This is helpful but only gets me to where I'm currently at. I understand there are model validators available, and now I understand why they are the way they are, but what's next? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To p

Re: Moving all validation into the model layer.

2010-02-18 Thread BrettH
This answers your question http://djangoadvent.com/1.2/history-model-validation/ On Feb 19, 7:36 am, orokusaki wrote: > BTW, I am aware of the ability to create your own custom model field > class with a custom `validate()` method like my following example. I'm > also aware of using a model's cl

Re: Moving all validation into the model layer.

2010-02-18 Thread orokusaki
BTW, I am aware of the ability to create your own custom model field class with a custom `validate()` method like my following example. I'm also aware of using a model's clean() method to raise logical validation errors, like if their email is a gmail address and they they specify that they are a Y

Moving all validation into the model layer.

2010-02-18 Thread orokusaki
My idea is probably not unique and Django is already moving in this direction. I apologize if this is the case. I have thought for a year, pertaining to Django, about one thing: Why doesn't validation propagate from the lowest level? Why should this have to take place at a higher level? What happe