Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

csrf.js and cookie.js #66

Open
kuyucakli opened this issue Jun 14, 2017 · 1 comment
Open

csrf.js and cookie.js #66

kuyucakli opened this issue Jun 14, 2017 · 1 comment

Comments

@kuyucakli
Copy link

kuyucakli commented Jun 14, 2017

Hi,
In static/js folder there is a csrf.js ( for ajax ).
But I couldn't find the line you are calling it, in the template files.
And why cookie.js is needed ? ( there is no comment line for this )?

When I add cookie.js I get error:

jquery.min.js:2 jQuery.Deferred exception: $.cookie is not a function TypeError: $.cookie is not a function
at HTMLDocument. (http://127.0.0.1:8000/admin/media_library/media/?:467:28)
at j (http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js:2:29999)
at k (http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js:2:30313) undefined

Thank you very much...

@kuyucakli kuyucakli changed the title csrf js csrf.js and cookie.js Jun 14, 2017
@sigurdga
Copy link
Owner

sigurdga commented Feb 14, 2018

$ grep -ri csrf.js                 
fileupload/templates/fileupload/picture_angular_form.html:<script src="/static/js/csrf.js"></script>
fileupload/templates/fileupload/picture_form.html:<script src="/static/js/csrf.js"></script>
fileupload/templates/fileupload/picture_jquery_form.html:<script src="/static/js/csrf.js"></script>
$ grep -ri cookie.js 
fileupload/templates/fileupload/picture_basicplus_form.html:<script src="/static/js/jquery.cookie.js"></script>
fileupload/templates/fileupload/picture_basic_form.html:<script src="/static/js/jquery.cookie.js"></script>

These files are added in the upstream project: https://github.com/blueimp/jQuery-File-Upload and I haven't looked into the details for this project. I was just impressed by the upstream example and wanted similar functionality in my Django projects.

BTW: I'm very sorry for this very late reply.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants