On Mon, Aug 13, 2012 at 5:10 PM, Melvyn Sopacua <m.r.sopa...@gmail.com>wrote: > > > data argument to a form instance must be a dictionary-like object. Other > then that there's no requirements. > I'm kinda curious why you need a form if you're using a non-html data > format. > > I figured it out :) It was as simple as creating a QueryDict and sending it in. Thanks for the suggestions!
The reason I'm using a Form (specifically a ModelForm) is to make my job of setting up the Validation a *whole* lot easier. Here's the code I basically used. Maybe there's a better way to do it? json_object = json.loads(request.POST['some_json_field']) q = QueryDict('') q = q.copy() q.update(json_object) form = MyModelForm(q) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.