On Fri, 2008-02-22 at 23:16 -0800, shabda wrote:
> I have a model like,
> 
> class Project(models.Model):
>    name = models.CharField()
>    expected_start_date = models.DateField()
>    actual_start_date = models.DateField()
> 
> I want to translate the SQL query,
> SELECT * FROM project WHERE expected_start_date > actual_start_date,
> 
> I cant do something like
> Project.objects.filter(   expected_start_date__gt =
> actual_start_date), so how can I translate the above sql query?

At the moment you have to write the SQL directly and execute it using
cursor.execute(). There are plans in the works to add a comparison field
for situations like this.

Malcolm

-- 
Why be difficult when, with a little bit of effort, you could be
impossible. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to