Ticket #7903: 7903.patch

File 7903.patch, 1.0 KB (added by mk, 7 years ago)
  • django/contrib/admin/templates/admin/change_form.html

    diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html
    index e8df6b9..b242a29 100644
    a b  
    6666    {% for dependency in field.dependencies %}
    6767    document.getElementById("{{ dependency.auto_id }}").onkeyup = function() {
    6868        var e = document.getElementById("{{ field.field.auto_id }}");
    69         if (!e._changed) { e.value = URLify({% for innerdep in field.dependencies %}document.getElementById("{{ innerdep.auto_id }}").value{% if not forloop.last %} + ' ' + {% endif %}{% endfor %}, {{ field.field.field.max_length }}); }
     69        if (!e._changed) { e.value = URLify({% for innerdep in field.dependencies %}document.getElementById("{{ innerdep.auto_id }}").value{% if not forloop.last %} + ' ' + {% endif %}{% endfor %}, {{ field.field.field.max_length|default_if_none:"50" }}); }
    7070    }
    7171    {% endfor %}
    7272{% endfor %}
Back to Top