hugo wrote: > Hi, > > One bug I just stumbled over: I added django.contrib.comments to my > INSTALLED_APPS and installed the model to the database. When I try to > open a comment (or try to add a comment in the admin), I get the > following exception: > > TemplateSyntaxError: Caught exception: AttributeError: > 'AdminBoundFieldSet' object has no attribute 'bound_field_lines' > args = ("Caught exception:\n AttributeError: 'AdminBoundFieldSet' > object has no attribute 'bound_field_lines'",) > source = (<django.core.template.StringOrigin object>, (6089, > 6135)) > traceback = ' File > "/home/rfc1437/project/django/core/templa...s__.__name__, self.name, > self.bound_field_lines)\n' > > > The weird thing: AdminBoundFieldSet is a subclass of BoundFieldSet and > that sets self.bound_field_lines in the __init__ - so the only idea I > have is that it's some weird exception in the initialization? The error > itself seems to be triggered by the __repr__ method of BoundFieldSet. > > bye, Georg > >
I was trying this for ages, then it turned out that it only happens with "Free comments". It turns out this was because of auto_now_add/auto_now on dates. This screws around with the meaning of 'editable' with fields - even though they are not editable they are still shown. Fixed in 1244. So the formfields were not getting created, but because it was mentioned in the explicit field lines, it was expected to be there. The model validator didn't pick it up because it also expected them to be there. So it was looking for FormFields which weren't there. It seems auto_now_add is not really recommended - LazyDate is. I'm wondering if it is a sensible thing to keep around?