On Monday, August 13, 2012 5:37:52 PM UTC-4, Melvyn Sopacua wrote:
>
>
> Hmm. You gain: 
> - an errors dict 
>
> At the cost of: 
> - form field instance creation 
> - widget instance creation 
>
> You can save some resources by investing in a JSONForm class and I'm 
> wondering if the following does not do the job: 
> json_object = json.loads(request.POST['fieldname']) 
> obj = MyModel(**json_object) 
> obj.full_clean() 
> obj.save() 
>
> -- 
> Melvyn Sopacua 
>

Very good points! I do like the error dict but I didn't think about all of 
the unnecessary other steps it was taking. Thanks a lot, Melvyn!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/s4UqegxcR_kJ.
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.

Reply via email to