This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getCsrf() { | |
var inputElems = document.querySelectorAll('input'); | |
var csrfToken = ''; | |
for (i = 0; i < inputElems.length; ++i) { | |
if (inputElems[i].name === 'csrfmiddlewaretoken') { | |
csrfToken = inputElems[i].value; | |
break; | |
} | |
} | |
return csrfToken; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Simple creation of a single-app django project, as described in: https://zindilis.com/posts/django-anatomy-for-single-app/ | |
# | |
# ./django_init foo | |
# | |
# This will result is the following flat structure: | |
# | |
# . | |
# └── foo |