raise AttributeError, "%s: %s" % (e, "model: %s,
field: %s" % model1, field1)
model2 = model2._meta.db_table
# Create the WHERE clause
self.where = "%s.%s %s %s.%s" % (model1, field1, op, model2,
field2)
def get_sql(sel
won't. Your example works, but it is not what I
need.
I need a queryset method, much like .filter(), to return a queryset,
applying that condition.
--
Costin Stroie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
Hi!
I have the following model:
class MyModel(models.Model):
maxwidth = models.IntegerField(Maximum width', default = '0')
width = models.IntegerField('Width', default = '0')
I need to perform a query similar to this:
SELECT * FROM mymodel WHERE width > maxwidth;
The result should be
3 matches
Mail list logo