Thursday, March 26, 2015

Re: Accessing django app from another app with ajax

Do you have the stacktrace? Without it it's gonna be hard
to help you.

My only guess is CORS (Cross-Origin Resource Sharing)? But
you should have the same error on local dev if you have similar
setup from your production.

On 03/26/2015 02:04 AM, Larry Martell wrote:
> I have a webservice written in django and I want to call it from a non
> django app with ajax. Both apps run on the same host. When I call the
> webservice with curl it works fine, but when I call it with ajax from
> the other app I get a 500 internal server error. There are no errors
> in the web server log. DEBUG is True, and ALLOWED_HOSTS = ['*']. When
> I run the dev server and connect to that I get no errors, just the 500
> error. I tried setting a breakpoint in the view, but it never makes it
> there.
>
> Anyone have any ideas as to why this is happening or how I could debug
> it further?
>

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5513EBD8.2060809%40arkade.info.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment