﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29772	SimpleLazyObject doesn't implement __gt__ / __lt__	Javier Buzzi	nobody	"Similar ticket: https://code.djangoproject.com/ticket/26287

I'm trying to implement this:

{{{
MinValueValidator(SimpleLazyObject(datetime.date.today))(datetime.date(2018, 9, 19))
}}}

The reason it doesn't work seems to be because `__lt__` and `__gt__` are not implemented in `LazyObject`.

When i make the following change:


{{{
class Simple(SimpleLazyObject):
     __lt__ = new_method_proxy(operator.lt)
     __gt__ = new_method_proxy(operator.gt)

MinValueValidator(Simple(datetime.date.today))(datetime.date(2018, 9, 17))
ValidationError: [u'Ensure this value is greater than or equal to 2018-09-19.']
}}}

I get my expected result.

This doesn't seem like an unreasonable ask.
"	New feature	closed	Core (Other)	dev	Normal	fixed			Ready for checkin	0	0	0	0	0	0
