The return is a JsonResponse instead of a redirect. The production server 
does listen on port 80, but has a permanent redirect to port 443 on the web 
server. The thing that's confusing is I'm using this pattern with other 
models, with the exception of the post_save signal, and I have no problems, 
even on https. I can save the object and return a JsonResponse no problem. 
It seems to be exclusively the signal that causes the issue, as far as I 
can tell.

On Friday, November 13, 2015 at 11:57:37 AM UTC-6, James Schneider wrote:
>
> On Fri, Nov 13, 2015 at 9:45 AM, Shawn H <shawn....@gmail.com 
> <javascript:>> wrote:
>
>> I have a post_save signal on a model. There are many different places 
>> where this model gets updated and saved, which is why I'm using the signal, 
>> to ensure each time the model is changed, the same code gets called. I make 
>> the calls to save the model instances via a jQuery post. When I run this on 
>> my local machine and test servers, the code works perfectly. When I move it 
>> to my production server, which is the only one running https, I 
>> get ('Connection aborted.', error(10061, 'No connection could be made 
>> because the target machine actively refused it')) back from the server. 
>> What can I do to fix this? Let me know what code might be helpful if 
>> necessary, and thanks in advance for the help. I'm using Django 1.8.2
>>
>
> Are you specifying a full path for the redirect that doesn't include 
> HTTPS? I would assume that all of your redirects would be relative if built 
> via standard Django mechanisms, but you mentioned JQuery, so I could see 
> JavaScript not generating the correct URL if you aren't careful. Is your 
> production server listening on tcp/80 (HTTP) at all?
>
> -James 
>
>

-- 
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+unsubscr...@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/2595e54a-11ec-40a9-825f-d0d3cd02aebb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to