but all failed :)
another try was:
var params = "username=" + user + "&password=" + passwd;
var xhr = Utils.createCORSRequest('GET', '192.168.1.183:8080/api-token-auth/');
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhr.setRequestHeader("Content-length", params.length);
xhr.onload = function () {
console.log(this.responseText);
};
xhr.send(params);
So far i would say my knowledge for the CORS situation via JQuery is a bit too low.
Maybe someone has an idea how to request the token inside the app and later on use it to call the django site and make an auto login.
Any help welcome :)
CORS_ORIGIN_ALLOW_ALL = True
CORS_URLS_REGEX = r'^/api/.*$'
| Filipe Ximenes +55 (81) 8245-9204 Vinta Software Studio http://www.vinta.com.br |
var ref = window.open(url, '_self', 'location=yes');
ref.addEventListener('exit', function(event) {
alert(event.type);
});
--
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...@googlegroups.com.
To post to this group, send email to django...@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/00ca9fea-316e-405b-95ba-3bc554a0274d%40googlegroups.com.
--
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...@googlegroups.com.
To post to this group, send email to django...@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/db6f6050-b1b9-4ea4-9729-94a3184c5e82%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/164005fc-c287-4e8e-bff1-563be5fe0492%40googlegroups.com.