STATIC_ROOT = os.path.join(BASE_DIR, 'collect_static/')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_URL = '/static/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
var list = {{ car.get_date }}
DatesDisabled: list,
function iframeClickEvent(){
var monitor = setInterval(function(){
var elem = document.activeElement;
if(elem && elem.tagName == 'IFRAME'){
clearInterval(monitor);
console.log(elem.getAttribute(''))
}, "json" );
window.iframeClickOn = false;
}
}, 100);
def left_join(phrases):
str = ','
return str.join(phrases).replace('rigth','left')
location /static/ {
alias /home/.../django_project/static/;
}
<form action="/your-name/" method="post">
{% csrf_token %}
{{ form }}
<input type="submit" value="Submit" />
</form>
$.ajax({
method: "POST",
url: '/invite/',
data: {
'email': email.val(),
'csrfmiddlewaretoken': CSRF_TOKEN,
'language':lang
},
success: function(response, status) {
alert(response['msg']);
dialog.dialog( "close" );
},
error: function(response) {
alert("Error");
dialog.dialog( "close" );
}
});
<script >var CSRF_TOKEN = "{{ csrf_token }}"</script>
var lang = $('html').attr('lang');
$.ajax({
method: "POST",
url: '/invite/',
data: {
'csrfmiddlewaretoken': CSRF_TOKEN,
'language':lang
},
translation.activate(request.POST['language'])