Re: Improved ajax support idea

2012-11-22 Thread Timothy Clemans
I like the idea. Could you create a third party app so I could use it right
away?


On Thu, Nov 22, 2012 at 2:39 AM, James Pic  wrote:

> Hi all,
>
> More projects use AJAX nowadays. Django could help them more.
>
> For example, FormView, could check if request.is_ajax_request(), and in
> that case return a JSON dict for example:
>
> {
> 'html': ,
> 'messages': [ installed>],
> 'error_fields': [ validate>],
> }
>
> All generic views could do something like this. The point is to provide a
> consistent API usable in AJAX.
>
> This doesn't seem like much work, but for some reason I like this idea a
> lot.
>
> What do you think ?
>
> I could work on a complete design document and documentation if you think
> it's worth it.
>
> Regards
>
> --
> 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
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>

-- 
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 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Improved ajax support idea

2012-11-22 Thread James Pic
Hi all,

More projects use AJAX nowadays. Django could help them more.

For example, FormView, could check if request.is_ajax_request(), and in
that case return a JSON dict for example:

{
'html': ,
'messages': [],
'error_fields': [],
}

All generic views could do something like this. The point is to provide a
consistent API usable in AJAX.

This doesn't seem like much work, but for some reason I like this idea a
lot.

What do you think ?

I could work on a complete design document and documentation if you think
it's worth it.

Regards

-- 
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 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.