Tuesday, March 3, 2015

Re: Traversing relationships based on lookup strings


On 2 Mar 2015, at 22:11, James Schneider <jrschneider83@gmail.com> wrote:

Nothing in Django specifically that I'm aware of (although that's not saying much), but you can probably do something pretty slick with the operator library and attrgetter:


Thanks - I thought that I might have to roll my own solution if there wasn't anything in Django, but operator.attrgetter looks like it'll make rolling my own easier.

Francis

No comments:

Post a Comment