I figured this out, so no need to continue using copy. Been a while since I
looked at Python. Sorry if these questions are obvious. Everything is
working like a charm now.

m = eval(p_model + '()')



On Sun, Jun 7, 2009 at 5:45 PM, Ethan Post <post.et...@gmail.com> wrote:

> Now that I have the solution to my original problem I am trying to make a
> few improvements. I want to be able to pass a list of dictionaries or a
> single dictionary and multiple records in a single put. The code is working
> but I have a couple issues. One, I pass in p_model but I only use it to
> perform a copy, are there any known issues with using copy on a db.model
> object? Should I use deepcopy instead?
>
> Also, can I use getattr or setattr to instantiate an entity instance in
> Dict_To_Model2 instead of passing in the entity? I can't figure it out. This
> would be the line "m = Foo()". Instead I would just pass in the name as a
> string. I wouldn't need to use copy if I could figure out how to do this.
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to