2007/8/19, Andreas Stuhlmüller <[EMAIL PROTECTED]>:
>
> On 8/17/07, David Larlet <[EMAIL PROTECTED]> wrote:
> > Just one (latest?) thought, it's a bit hard to debug because
> > 400 errors are not really verbose, is it possible to find a
> > way to make debug easier? For the moment, I have: if
> > settings.DEBUG: print i.errors but I'm sure it can be better.
>
> I made the 400 error template a bit more verbose. The responder
> classes that use serializers include the model errors in their
> responses anyway. Is this what you were looking for?

Exactly, thanks for your pointer.

>
> > In fact, the problem is that you use ResourceForm in
> > model_resource and it could be interesting to use the given
> > form_class instead.
>
> You're right, it might be nice to be able to change the validation and
> data cleanup behavior of resources. Check out the latest revision and
> tell me if this is along the lines you were thinking.
>

That's what I had in mind, thanks for your reactivity.

Two little "issues" (maybe issues should be submitted to the google project?):

* in TemplateResponder.update_form(), the 'update' var allow to deal
with different forms in the same template (add the hidden fake PUT
field for instance) but given the fact that there is no 'update' var
in the create_form() function, you can't simply use {% if update %},
simple patch: add 'update': False.

* in update_form(), you test if request.PUT: but AFAIK with the
middleware you can't do that, you should test with if request.method
== 'PUT':

David

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to