Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2599 -- Fixed rendering problem in comma-separated integer fie…

…lds.

Thanks, Christopher Lenz.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 00734bca7ed94e36d62dfb306b8b9b48df74e766 1 parent 539438a
Malcolm Tredinnick authored September 23, 2006

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  django/forms/__init__.py
7  django/forms/__init__.py
@@ -969,6 +969,13 @@ def isCommaSeparatedIntegerList(self, field_data, all_data):
969 969
         except validators.ValidationError, e:
970 970
             raise validators.CriticalValidationError, e.messages
971 971
 
  972
+    def render(self, data):
  973
+        if data is None:
  974
+            data = ''
  975
+        elif isinstance(data, (list, tuple)):
  976
+            data = ','.join(data)
  977
+        return super(CommaSeparatedIntegerField, self).render(data)
  978
+
972 979
 class RawIdAdminField(CommaSeparatedIntegerField):
973 980
     def html2python(data):
974 981
         if data:

0 notes on commit 00734bc

Please sign in to comment.
Something went wrong with that request. Please try again.