On 1/23/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote:
> Let me see if I can clarify the new use of manipulators here. You
> either use a manipulator *or* you have to explicitly set every
> attribute of your model. Only manipulators know which elements from
> the POST data ought to be passed int
On 1/22/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> I've been messing with manipulator code in magic-removal, and it
> struck me that we could avoid a lot of the boilerplate, cruft and
> newbie confusion by making models validation-aware.
Let me see if I can
Adrian Holovaty wrote:
> I've been messing with manipulator code in magic-removal, and it
> struck me that we could avoid a lot of the boilerplate, cruft and
> newbie confusion by making models validation-aware.
In general, I think this is a very good idea. I can't say I
This:
>What I'm suggesting is that validation only happens when you do
>save(), or when you access the "errors" attribute. This means you can
>set data on the model to your heart's content until you actually want
>to validate it.
won't work with that:
>This is a good question. I don't see a *hu
I don't have any time to do anything about this, but I can't really see
how this is going to work. Eg, edit inline. Is your plan now to totally
destroy edit inline for non-ajax uses? Also, the whole problem that the
follow argument to manipulators solves arises again ( how to deal with
partially u
Adrian Holovaty wrote:
p = Poll(pub_date=request.POST.get('pub_date'),
question=request.POST.get('question'),
num_votes=request.POST.get('num_votes'))
Some automation is needed for this. Currently automatic manipulators can
deal with copy of POST dict themselves.
On 1/22/06, hugo <[EMAIL PROTECTED]> wrote:
> Make that a defined Exception instead of an attribute and I might like
> it. Something along these lines:
>
> try:
>p = Poll()
> except ValidationErrors, e:
>print e.errors
>
> So the ValidationErrors would be an exception that collects all
># a.errors is a property that returns a dictionary
># of field names to lists of errors. Maybe this could
># be named something else, so as not to clash with the
># field namespace -- perhaps "_errors" with a leading
># underscore.
Make that a defined Exception instead of an attr
On 1/22/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> I've been messing with manipulator code in magic-removal, and it
> struck me that we could avoid a lot of the boilerplate, cruft and
> newbie confusion by making models validation-aware.
+1; this would even be
I've been messing with manipulator code in magic-removal, and it
struck me that we could avoid a lot of the boilerplate, cruft and
newbie confusion by making models validation-aware. Example:
class Poll(Model):
pub_date = DateTimeField()
question = CharField(maxleng
10 matches
Mail list logo