python 2.7 - django filtering date condition -


i posting 1st job(jobname=job1) on march10, should live (livedate=march15) , expire on march20.

i posting 2nd job(jobname=job2) on april15, should live (livedate=april20) , expire on april25

i posting 3rd job(jobname=job3) on may20, should live (livedate=may25) , expire on may30.

while filtering "jobname" , "livedate", have display jobs should have "livedate" greater or equal "today's date".

how should write view?

help me , in advance.

//order livedate jobs = job.objects.filter(livedate__gte=datetime.date.today()).order_by('livedate')  //or order livedate filter job jobs = job.objects.filter(            jobname=job1,             livedate__gte=datetime.date.today()        ).order_by('livedate') 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -