CSRF token is null!

71 views
Skip to first unread message

Dassine B.

unread,
Aug 1, 2015, 9:31:33 PM8/1/15
to Google App Engine

Hi there !

I'm building a form which allows the user to upload files. Everything works perfectly locally but not live. I got this error : 

POST http://trocodeal.co/ 500 (Internal Server Error)
send @ jquery.min.js:5
b.extend.ajax @ jquery.min.js:5
send @ jquery.fileupload.js:711
(anonymous function) @ jquery.min.js:3
c @ jquery.min.js:3
p.add @ jquery.min.js:3
(anonymous function) @ jquery.min.js:3
b.extend.each @ jquery.min.js:3
(anonymous function) @ jquery.min.js:3
b.extend.Deferred @ jquery.min.js:3
r.then @ jquery.min.js:3
$.widget._onSend @ jquery.fileupload.js:755
(anonymous function) @ jquery.ui.widget.js:105
$.each.newData.submit @ jquery.fileupload.js:811
(anonymous function) @ jquery.fileupload-ui.js:105
c @ jquery.min.js:3
p.fireWith @ jquery.min.js:3
(anonymous function) @ jquery.fileupload-ui.js:618
b.event.dispatch @ jquery.min.js:3
v.handle @ jquery.min.js:3

After hours of research and trying many solution. It might be related to crsftoken. this one is available when I use my local environment but not my domain. Is this possible ? 

I'm stumped and really stuck ! If anyone can help, it will be really appreciated !

Thanks !

FYI. I'm new in web development/GAE/Django

Dassine B.

unread,
Aug 3, 2015, 2:07:18 AM8/3/15
to Google App Engine
My mistake. I removed  2 lines in settings.py : 

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
)

Dassine B.

unread,
Aug 4, 2015, 1:52:06 AM8/4/15
to Google App Engine
Having the token didn't fix my problem. I still can't uploads files. It works only locally. 

Please if anyone can help me to figure out what's going on it will be really appreciated ! 

Ryan (Cloud Platform Support)

unread,
Aug 4, 2015, 11:32:16 AM8/4/15
to Google App Engine
Salutations Dassine,

This would be best posted on StackOverflow. You will need to include the code you use and the logs you see here with the error.
Reply all
Reply to author
Forward
0 new messages