On 2/3/06, sam <[EMAIL PROTECTED]> wrote:
> My bar() is a pure function defined outside all model classes but that
> gave me the error. (If I defined it inside the same class from which it
> was called, then it's OK). How do I deal with this?
This is a bit of annoying magic Django currently does,
Amit,
My bar() is a pure function defined outside all model classes but that
gave me the error. (If I defined it inside the same class from which it
was called, then it's OK). How do I deal with this?
To import, what package path should I use?
Sam
On 2/3/06, sam <[EMAIL PROTECTED]> wrote:
I was tring to write a custom function inside a mode class, say X:class X(meta.Model):i = meta.IntegerField()...def foo(self):return bar(self.i)If I define bar() in the same model file, django complained the
"NameError -- global name bar
3 matches
Mail list logo