OK. I found the solution and hope this description prevents someone else
from having to deal with this pain in the ass gotcha. "Gotcha" for me
anyhow :)
So if your ajax target resides in the urls.py of some module somewhere (in
this case persistent_messages)
and your referencing it from an SSL
> "Either way I cannot get the ajax call to succeed in triggering the django
> backend at all"
>
By "django backend" I simply mean the persistent_messages/views.py, which
should be referenced when the ajax url calls /messages/marked_read/X (as
defined in persistent_messages/urls.py. Again a
I added the getcookie call to grab csrftoken (ref from the link you
provided),
but the farthest I can get is by setting ajax async:false which causes the
status reported by chrome developer tools (for call /messages/marked_read/X
) to be PENDING.
Without async:false, it just goes to CANCELLED.
If that's an AJAX POST request, then it may be because you are not passing
the CSRF token in the header. Add this code before doing the AJAX call:
function csrfSafeMethod(method) {
// these HTTP methods do not require CSRF protection
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));}$.aj
So I have django 1.5.1 installed,
have persistent messages installed, and have messages displaying in a list
via the template reference {% include
"persistent_messages/message/includes/messages.jquery.html" %}
The following javascript click trigger is bound to an anchor tag within the
list:
$(c
5 matches
Mail list logo