{"id":29288779,"url":"https://github.com/ebertti/js-csrf-django","last_synced_at":"2025-07-06T03:12:47.786Z","repository":{"id":5612232,"uuid":"6819668","full_name":"ebertti/js-csrf-django","owner":"ebertti","description":"Simple javascript to make easy to make POST with AJAX using Django. Based on django documentation","archived":false,"fork":false,"pushed_at":"2015-01-26T16:30:03.000Z","size":123,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T12:07:30.568Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ebertti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-22T22:23:44.000Z","updated_at":"2021-12-08T14:55:20.000Z","dependencies_parsed_at":"2022-09-22T03:41:38.741Z","dependency_job_id":null,"html_url":"https://github.com/ebertti/js-csrf-django","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ebertti/js-csrf-django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebertti%2Fjs-csrf-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebertti%2Fjs-csrf-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebertti%2Fjs-csrf-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebertti%2Fjs-csrf-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebertti","download_url":"https://codeload.github.com/ebertti/js-csrf-django/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebertti%2Fjs-csrf-django/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263841795,"owners_count":23518496,"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":[],"created_at":"2025-07-06T03:12:40.941Z","updated_at":"2025-07-06T03:12:47.781Z","avatar_url":"https://github.com/ebertti.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"js-csrf-django\n==============\n\nSimple javascript to make easy to make POST with AJAX using Django. Based on django documentation.\n\nInstallation\n------------\n\n1. Add ``CsrfViewMiddleware`` in your  ``MIDDLEWARE_CLASSES`` in ``settings.py`` file of your project. \n``` python\nMIDDLEWARE_CLASSES = (\n\t...\n\t'django.middleware.csrf.CsrfViewMiddleware',\n\t...\n)\n```\n\n2. Add the javascript file  ``https://raw.github.com/ebertti/js-csrf-django/master/csrf.js`` in the ``head`` of your html page, rather in yout ``base.html``, after jQuery file:\n```html\n\n\t\u003chtml\u003e\n\t\t\u003chead\u003e\n\t\t\t\u003cscript src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\"\u003e\u003c/script\u003e\n\t\t\t\u003cscripr scr=\"https://raw.github.com/ebertti/js-csrf-django/master/csrf.js\"\u003e\u003c/script\u003e\n\t\t\u003c/head\u003e\n\t\u003c/html\u003e\n```\n3. Now you can make your AJAX request using POST.\n\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ebertti/js-csrf-django/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febertti%2Fjs-csrf-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febertti%2Fjs-csrf-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febertti%2Fjs-csrf-django/lists"}