On Wed, Jun 22, 2011 at 10:56 AM, Shawn Milochik <sh...@milochik.com> wrote:
> https://code.djangoproject.**com/ticket/16306<https://code.djangoproject.com/ticket/16306> > > Would a core dev or two please give their opinion on this? I think it's > a bug and not a flaw in the documentation. As I read the docs it seems > plain that the max_value and min_value do what I think a reasonable > person would expect them to do. In fact, they do behave in that way when > set in the field "normally." So the fact that they do nothing when used > in an __init__ override of the form is a bug or, at best, a very > surprising behavior. > > Eh...whenever I override __init__ I'm conscious that any args passed to super __init__ may have been "used" by the time the super call returns -- that is, their value at the time of the super call may have been used to do some non-trivial initialization that can't be over-ridden simply by changing an attribute value later. So I don't find the current behavior particularly surprising. It is generally nicer, though, when that doesn't happen, so if there is a way to avoid "freezing" these values at super init time, without introducing too much complexity, that would be worthwhile. It looks like Chris has posted a patch that might achieve that...unfortunately I don't have time right now to look at the specifics of it too closely. Karen -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.