Re: FieldError with get_object_or_404

2010-02-04 Thread Andy McKay
On 2010-02-04, at 7:36 AM, harryos wrote: > In the shell I tried this > from django.shortcuts import get_object_or_404 as gtobj > e1=gtobj(MyEntry,posted_time__year=2010,posted_time__month=2,posted_time__day=1) > This is successful ,it gives this message > MultipleObjectsReturned: get() returned

FieldError with get_object_or_404

2010-02-04 Thread harryos
hi I was trying out in django's python shell the get_object_or_404 method on a set of entries I created in the db.I created an entry with a DateTimeField called 'posted_time'.I used datetime.datetime.now as default value and it created Date:2010-02-01 Time:10:02:22 I also created many other such