What data format is your view returning? Django views return HTTP response objects (by default, at least) - although Python lists (and other Python collections?) should work when passed into a view in its context (I have found Django querysets to be an exception).
AJAX is Asynchronous Javascript, so I presume that an AJAX call would expect something like JSON output from a callable. I guess with some pain one could get Javascript to ingest Django querysets? I couldn't think of a sensible reason to do so - and I stand to be corrected. On Wed, Jul 3, 2013 at 12:06 AM, Larry Martell <[email protected]>wrote: > I'm invoking a view from an ajax call and I want to return data. But > the browser interpertates the return as a 500 (internal sever error) > and my ajax success function does not get called. How can I return a > successful status (like a 201) and also return data? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Regards, Sithu Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.

