Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@property used in a dexterity content class #179

Open
sgeulette opened this issue Mar 28, 2023 · 0 comments
Open

@property used in a dexterity content class #179

sgeulette opened this issue Mar 28, 2023 · 0 comments

Comments

@sgeulette
Copy link
Member

Hi,
Working on a product migration to plone6 (python 3.10), I encounter an error with the @Property defined on a method of the object class.

class CKTemplate(Document):
    @property
    def html(self):
        return ''

obj.html gives this error:
*** AttributeError: 'RequestContainer' object has no attribute 'html'
obj is well an instance of the CKTemplate class.

If I remove the property decorator, calling obj.html() works.

The decorator is not a real need in my case. I will remove it but I let this issue to keep a trace... if useful for someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant