Thank you!
What I'm doing is to load a model from a template.
I have in a template something like this:
{% block menu %}
{% block rss %}

I want to load "menu" and "rss", but I think that is too much work for
now, I have no idea how to implement it and I probably won't do it.
Thank you very much for your help.




On 11 abr, 00:07, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote:
> On Tue, 2007-04-10 at 18:03 -0500, Jeremy Dunck wrote:
> > 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. :)
>
> What he said! (I'm inclined to be so trusting...)


--~--~---------~--~----~------------~-------~--~----~
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