Thanks Alex, I didn't know this function, that's what I needed!
Bastien
On Apr 20, 1:40 pm, Alex Koshelev wrote:
> Hi, Bastien.
>
> I think the simple solution with property may be the best aproach if
> you cannot change dependent code:
>
> user = property(lambda self: self.author)
>
>
>
> On Mo
Hi, Bastien.
I think the simple solution with property may be the best aproach if
you cannot change dependent code:
user = property(lambda self: self.author)
On Mon, Apr 20, 2009 at 3:37 PM, Bastien wrote:
>
> You're right Dougal, I *should* do that I have various apps already
> working with
You're right Dougal, I *should* do that I have various apps already
working with the whole project trying to access object.user in general
and I was wondering if there was a clean way to alias author. I'm
already using some workarounds but it's dirty...
On Apr 20, 1:26 pm, Dougal Matthews wrote
why don't you just access entry.author rather than entry.user?
I think perhaps I'm not quite following your question.
Dougal
---
Dougal Matthews - @d0ugal
http://www.dougalmatthews.com/
2009/4/20 Bastien
>
> Hi,
>
> I searched the doc but couldn't find anything about this: I have a
> model
Hi,
I searched the doc but couldn't find anything about this: I have a
model for a blog entry that contains a foreign key to user and is
named author. But that would be really convenient for me if the object
would respond to the keyword 'user' as well: entry.user doesn't exist
in the model but I
5 matches
Mail list logo