results.append({'URL': '/feed/%s/show/%s' % (item.rss, item.rssfeed),})
On Thu, Aug 21, 2008 at 23:29, Bobby Roberts <[EMAIL PROTECTED]> wrote:
>
> hi.
>
> I'm trying to figure out how to dynamically replace things in a string
> as follows:
>
>
>results.append({'URL': '/feed/%s/show/%s' (%ite
On 4/10/07, Grupo Django <[EMAIL PROTECTED]> wrote:
>
> I know this is not the right place for asking about python, but it's a
> simple question.
> I need to load an object given in a string. Example:
>
> #I have a class called foo
> class foo:
> def Hello():
> return "Hello World"
>
>
On Tue, 2007-04-10 at 17:50 -0500, Jeremy Dunck wrote:
> On 4/10/07, Grupo Django <[EMAIL PROTECTED]> wrote:
> >
> > I know this is not the right place for asking about python, but it's a
> > simple question.
> > I need to load an object given in a string. Example:
> >
> > #I have a class called f
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 t
This should work:
class Foo:
def hello(self):
return "Hello World"
object = Foo()
print object.hello()
More information:
http://www.diveintopython.org/object_oriented_framework/index.html
Ciao,
- Matt
On Apr 11, 12:22 am, "Grupo Django" <[EMAIL PROTECTED]> wrote:
> I know this i
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
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 f
> 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 m
8 matches
Mail list logo