{"id":22769770,"url":"https://github.com/bfontaine/jquery-djangocsrf","last_synced_at":"2025-07-14T16:06:11.201Z","repository":{"id":15245575,"uuid":"17974506","full_name":"bfontaine/jquery-djangocsrf","owner":"bfontaine","description":"A lightweight jQuery plugin to automatically add Django CSRF token to your AJAX calls","archived":false,"fork":false,"pushed_at":"2024-06-27T14:59:59.000Z","size":35,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T03:52:54.666Z","etag":null,"topics":["django","jquery","js"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bfontaine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-03-21T09:21:59.000Z","updated_at":"2024-06-27T15:00:02.000Z","dependencies_parsed_at":"2025-04-15T03:24:08.120Z","dependency_job_id":"7ab3fbbf-0a10-485d-af1f-589cb929353c","html_url":"https://github.com/bfontaine/jquery-djangocsrf","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bfontaine/jquery-djangocsrf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fjquery-djangocsrf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fjquery-djangocsrf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fjquery-djangocsrf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fjquery-djangocsrf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfontaine","download_url":"https://codeload.github.com/bfontaine/jquery-djangocsrf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fjquery-djangocsrf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265314402,"owners_count":23745262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","jquery","js"],"created_at":"2024-12-11T15:15:37.096Z","updated_at":"2025-07-14T16:06:11.173Z","avatar_url":"https://github.com/bfontaine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jQuery Django CSRF Plugin\n\n[![Build Status](https://travis-ci.org/bfontaine/jquery-djangocsrf.svg?branch=master)](https://travis-ci.org/bfontaine/jquery-djangocsrf)\n\nThe **djangocsrf** jQuery plugin makes it easy to use AJAX calls with Django’s\nCSRF token.\n\n## Installation\n\n[Download][release-0.1.1] and include the script *after* the jQuery library and\nthe Cookie library:\n\n```html\n\u003cscript src=\"https://code.jquery.com/jquery-1.9.1.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/js-cookie/js-cookie@1.5.1/src/js.cookie.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/bfontaine/jquery-djangocsrf@0.1.1/jquery.djangocsrf.js\"\u003e\u003c/script\u003e\n```\n\n[release-0.1.1]: https://github.com/bfontaine/jquery-djangocsrf/releases/download/0.1.1/jquery.djangocsrf-0.1.1.min.js\n\n## Usage\n\nEnable the plugin:\n\n```js\n$.djangocsrf( \"enable\" );\n```\n\nThat’s all! After that, all AJAX calls made through jQuery to the current\ndomain will include an `X-CSRFToken` header set to the client’s token.\n\nDisable the plugin with `$.djangocsrf( \"disable\" )`, and query its current\nstate with `$.djangocsrf()`.\n\n## Tests\n\n    $ npm install -g grunt-cli\n    $ npm install -d\n\nRequires Node. Start the server:\n\n    $ node test/server.js\n\nThen open `http://0.0.0.0:8124/test/index.html` in your browser.\n\nBasic tests can also be run with `grunt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Fjquery-djangocsrf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfontaine%2Fjquery-djangocsrf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Fjquery-djangocsrf/lists"}