Aggregation across foreign keys / complex aggregation and annotation

2009-01-16 Thread Christopher Mutel
Following the general rule that no good deed goes unpunished, I have a question about complex aggregation / annotation or annotation across foreign keys. I have the following simplified model: class Unit(models.Model): unit = models.TextField() class Process(models.Model): process =

Does using the IPython shell add "LIMIT" to Django ORM discussion (using SQLite)

2009-01-08 Thread Christopher Mutel
Hello all- I recently filed a bug about incorrect SQL generation, and Malcom Tredinnick said that the example SQL I provided couldn't be correct, because there was an extra LIMIT clause that shouldn't be there. After poking around for a bit, I realized that everytime I was executing my query in

A twist on cross importing models

2008-05-07 Thread Christopher Mutel
Hello all- I have tried a couple of tips found on the list to solve my problem with circular model imports, but with no lucks. Here is my basic schema: #foo/models.py from bar.models import Formula class Variable(models.Model): amount = models.FloatField(null=True) is_formula =