update assets

This commit is contained in:
2021-05-07 11:02:38 +00:00
parent b314611cdb
commit b629ec3be1
4 changed files with 71 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
window.addEventListener("load", function() {
(function($) {
var slug = $("input#id_slug").val();
$("input#id_title").on('input', function() {
var title = $("input#id_title").val();
@@ -10,7 +12,7 @@ window.addEventListener("load", function() {
getUrl = window.location
baseUrl = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[0];
$.ajax({type:'GET', url: baseUrl + 'posts/func/slug_calc', data:{'title': title }, complete:complete});
$.ajax({type:'GET', url: baseUrl + 'posts/func/slug_calc', data:{'title': title, 'slug': slug }, complete:complete});
});
})(django.jQuery);
});