Closed GoogleCodeExporter closed 9 years ago
Original comment by daevaorn
on 23 Sep 2009 at 6:15
Please find attached a proof of concept patch for this issue.
Example of usage:
{{{
# models.py
class Client(models.Model):
weight = models.PositiveSmallIntegerField(_('weight'), max_length=1, default=1)
...
class Product(models.Model):
client = models.ForeignKey(Client, verbose_name=_('client'))
....
# index.py
class ClientIndexer(WeightenedIndexer):
weight = 'weight'
...
class ProductIndexer(WeightenedIndexer):
weight = 'client.weight'
...
}}}
Original comment by esizi...@gmail.com
on 15 Oct 2009 at 10:55
Attachments:
I could make some polishing of the patch if your are interested in it enough ro
push it
upstream in a near future.
Original comment by esizi...@gmail.com
on 15 Feb 2010 at 5:00
Yep. But I think that it is better to use Field.resolve method to extract
weight value.
Original comment by daevaorn
on 18 Feb 2010 at 9:55
done in r354
Original comment by daevaorn
on 20 Mar 2010 at 6:39
Original issue reported on code.google.com by
esizi...@gmail.com
on 23 Sep 2009 at 2:59