An extra clause allows you to do this:
Project.objects.extra(where=['expected_start_date >
actual_start_date'])
On Feb 23, 8:16 am, shabda <[EMAIL PROTECTED]> 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?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---