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

Docs suggestion vis-a-vis staticmethods #440

Open
roysmith opened this issue Jan 11, 2023 · 0 comments
Open

Docs suggestion vis-a-vis staticmethods #440

roysmith opened this issue Jan 11, 2023 · 0 comments

Comments

@roysmith
Copy link

It took me a bit of head-scratching to figure out why

@cache.memoize(timeout=30)
@staticmethod
def from_nomination(nomination):

doesn't work, i.e. you need to do:

@staticmethod
@cache.memoize(timeout=30)
def from_nomination(nomination):

following the same logic as described under Caching View Functions. You might want to mention this in the docs.

PS, while we're there, in the warning box, "If you reverse both decorator" should be "If you reverse both decorators" (plural).

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

No branches or pull requests

1 participant