I forgot to mention, I do use the Forms to also exclude certain fields. 
Maybe a JSON Form class would do me some good here, afterall. The one 
problem is that my time is limited (budget) so I've got to make sure I 
don't spend too much time chasing down an optimized happy path. Although, 
it would definitely be a sound way to go if it doesn't take too much time.

On Monday, August 13, 2012 6:08:11 PM UTC-4, Kurtis wrote:
>
> 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/-/MtzFwA8u_vUJ.
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