python - queryset filter month returns empty -


edit: dropped , waited few days started working! how upgrade 1.6 took while 'propagate'! shrugs. chimed in!

the queryset filter month not seem working correctly. have bunch of objects in database model called note field pub_date storing datetime object. want retrieve note objects month. here test did:

>>> blogengine.models import note >>> n = note.objects.all()[0] >>> n.pub_date datetime.datetime(2014, 3, 8, 21, 15, 14, tzinfo=<utc>)  >>> note.objects.filter(pub_date__year = 2014) [<note: note object>, <note: note object>]  >>> note.objects.filter(pub_date__month =3) [] 

as can see year works correctly, giving me 2 objects year=2014, month lookup returns nothing though there object month can seen first example object n. happens other datetime lookups day or minute.

python = 2.7.5 django 1.6.2

so dropped , waited few days started working! how upgrade 1.6 took while 'propagate'! shrugs.

thanks chimed in!


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -