On 4/10/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
...
> The key is that he wanted to use the string name of the class, not the
> class itself. Assuming that Foo is available (i.e., is local to the code
> you're running or has been imported), this should work:
>
> o = locals()['Foo']()

Oh.  In that case, you also want to make sure the string is trust-worthy.

I hope you're not creating a class instance from a request parameter. :)

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to