This commit is contained in:
A B
2024-10-20 21:37:04 +00:00
commit 9ffab39f4f
26 changed files with 1014 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
// static/admin/js/generate_uuid.js
function generateUUID() {
let uuid = '';
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const length = 10;
for (let i = 0; i < length; i++) {
const randomIndex = Math.floor(Math.random() * characters.length);
uuid += characters[randomIndex];
}
const hashField = document.getElementById('id_hash');
if (hashField) {
hashField.value = uuid;
}
}
document.addEventListener('DOMContentLoaded', function () {
generateUUID();
});