straight55b / app-engine-patch

Automatically exported from code.google.com/p/app-engine-patch
0 stars 0 forks source link

fix AttributeError: '_ClassKeyProperty' object has no attribute '_verbose_name' #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create two model classes:
class PolyPerson(polymodel.PolyModel):
    pass

class Person(PolyPerson):
    pass

2. create form class:

class PersonForm(forms.ModelForm):
    class Meta():
        model = Person

3. I created an Admin model too, but do not know if this is necessary to
reproduce issue. Start the server and send a request there.

What is the expected output? What do you see instead?
You'l see AttributeError: '_ClassKeyProperty' object has no attribute
'_verbose_name'. Caused by PolyModel usage, I guess.

What version of the product are you using? On what operating system?
trunk aep

patch attached

Original issue reported on code.google.com by A.A.Vasi...@gmail.com on 12 Feb 2009 at 10:03

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks! Please try again. The _class property shouldn't even be visible in 
forms.

Original comment by wkornew...@gmail.com on 12 Feb 2009 at 10:21

GoogleCodeExporter commented 9 years ago
It's OK now. 
N.B. no property was visible in the form even without the second chunk of the 
patch.

Original comment by A.A.Vasi...@gmail.com on 13 Feb 2009 at 8:36

GoogleCodeExporter commented 9 years ago
OK. I'll leave it that way, though, so other code works correctly, too.

Original comment by wkornew...@gmail.com on 13 Feb 2009 at 11:03