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 <bastien.roche...@gmail.com> > > 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 would like it to return what entry.author usually > returns, just like an alias. Does anything like that exists in Django? > is it considered good practice? I could just use the author key or > rename it to user but what happens is that I have various applications > that already work with either object.user or object.author and I don't > want to rewrite them all. Thanks. > > > --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---