On May 25, 2:32 pm, Larry Martell <larry.mart...@gmail.com> wrote: > On Fri, May 25, 2012 at 2:24 AM, bruno desthuilliers > > >> I couldn't use the display name or the getattr failed. > > > ??? > > When I first did: > > extra(select={"Delta" : self.field_name}) > > Then getattr(self.field_name) failed with "object has no attribute > 'col1-col2'".
Obviously - the attribute name is then "Delta", not self.field_name (which is rather a misleading name since it's really an sql clause, not a field name). > Yes, I've been writing python for years too, Sorry, that's not always the case for peoples posting here. > and I realize I can put > in a dict. But it still has to be in 2 places - the code that > implements the first query that generates the chart, and the code that > does the drill down query when they click on a point. You can eventually define the dict in one place and use it from both, but once again it's hard to say without seeing the real code :-| -- 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.