On Mon, Mar 16, 2009 at 12:42, a b <dolittle...@gmail.com> wrote:
> Hi,
>
> I'm building a one page app with no page refresh.
> All the content is loaded as JSON dynamically and the UI is built using
> javascript.
>
> I'm using external django apps and I need them to send back the context dict
> as JSON instead
> of rendering the html template.
>
> Is it possible to override render_to_response so all the apps using it will
> respond with JSON without
> actually touching the apps code? I don't want to create a middleware that
> will modify the response because
> then I have the overhead of rendering the html template.

Unless I'm mistaken it should be fairly simple in this case to create
your own set of templates for each of the django apps you're using and
then have them output the data you need as json text instead of as
html

> Thanks
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to