Skip to content

Instantly share code, notes, and snippets.

@marekw2143
Created November 5, 2011 18:24
Show Gist options
  • Save marekw2143/1341852 to your computer and use it in GitHub Desktop.
Save marekw2143/1341852 to your computer and use it in GitHub Desktop.
diff --git a/pyjs/jsonrpc/django/jsonformprocessor.py b/pyjs/jsonrpc/django/jsonformprocessor.py
index 1211ab8..ef1f478 100644
--- a/pyjs/jsonrpc/django/jsonformprocessor.py
+++ b/pyjs/jsonrpc/django/jsonformprocessor.py
@@ -68,7 +68,7 @@ def describe_fields_errors(fields, field_names):
def describe_field(field):
res = {}
- field_type = field.__class__.__name__
+ res['type'] = field_type = field.__class__.__name__
for fname in field_names.get(field_type, []) + \
['help_text', 'label', 'initial', 'required']:
res[fname] = getattr(field, fname)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment