Author: mtredinnick
Date: 2008-08-23 17:10:45 -0500 (Sat, 23 Aug 2008)
New Revision: 8505

Modified:
   django/trunk/django/contrib/admin/templates/admin/prepopulated_fields_js.html
Log:
Fixed #7903 -- Allow admin's prepopulated_from to work with TextFields. Patch
from mk and Alex Gaynor.


Modified: 
django/trunk/django/contrib/admin/templates/admin/prepopulated_fields_js.html
===================================================================
--- 
django/trunk/django/contrib/admin/templates/admin/prepopulated_fields_js.html   
    2008-08-23 22:05:11 UTC (rev 8504)
+++ 
django/trunk/django/contrib/admin/templates/admin/prepopulated_fields_js.html   
    2008-08-23 22:10:45 UTC (rev 8505)
@@ -4,8 +4,8 @@
     {% for dependency in field.dependencies %}
     document.getElementById("{{ dependency.auto_id }}").onkeyup = function() {
         var e = document.getElementById("{{ field.field.auto_id }}");
-        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 }}); }
+        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" }}); }
     }
     {% endfor %}
 {% endfor %}
-</script>
\ No newline at end of file
+</script>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to