Opened 13 years ago

Closed 11 years ago

#137 closed defect (fixed)

TypeError: can't compare datetime.datetime to in

Reported by: nesh@… Owned by: Jacob
Component: Generic views Version:
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When accessing /weblog/.... url, object_detail in throws exception:

File "/Users/nesh/devel/workspace/django_src/django/views/generic/", line 200, in object_detail
    if date >= now:

TypeError: can't compare datetime.datetime to

Solution: (diff)

diff -u -r1.1
---	21 Jul 2005 12:24:11 -0000	1.1
+++	21 Jul 2005 12:40:45 -0000
@@ -188,7 +188,7 @@
             the object to be detailed
-        date =*time.strptime(year+month+day, '%Y%b%d')[:3])
+        date = datetime.datetime(*time.strptime(year+month+day, '%Y%b%d')[:3])
     except ValueError:
         raise Http404
     mod = get_module(app_label, module_name)

Change History (2)

comment:1 Changed 11 years ago by mir@…

Component: ToolsGeneric views
Owner: changed from Adrian Holovaty to Jacob
Triage Stage: UnreviewedAccepted

I'm surprised to see this still applies.

comment:2 Changed 11 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

This was fixed two years ago today, in [308].

Note: See TracTickets for help on using tickets.
Back to Top