ktongue's picture
download
raw
1.06 kB
'use strict';
{
const $ = django.jQuery;
$.fn.djangoAdminSelect2 = function() {
$.each(this, function(i, element) {
$(element).select2({
ajax: {
data: (params) => {
return {
term: params.term,
page: params.page,
app_label: element.dataset.appLabel,
model_name: element.dataset.modelName,
field_name: element.dataset.fieldName
};
}
}
});
});
return this;
};
$(function() {
// Initialize all autocomplete widgets except the one in the template
// form used when a new formset is added.
$('.admin-autocomplete').not('[name*=__prefix__]').djangoAdminSelect2();
});
document.addEventListener('formset:added', (event) => {
$(event.target).find('.admin-autocomplete').djangoAdminSelect2();
});
}

Xet Storage Details

Size:
1.06 kB
·
Xet hash:
394520e4ee50178e85c8f269954c1c3a453ee8108ffa61fea48f1c1e274607d4

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.