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

AttributeError when using decorator with field name #1

Closed
montylounge opened this issue Aug 20, 2009 · 2 comments
Closed

AttributeError when using decorator with field name #1

montylounge opened this issue Aug 20, 2009 · 2 comments

Comments

@montylounge
Copy link

If I don't pass the field name agument to the decorator then honeypot works fine.

Pseudo code below...

@check_honeypot('foo_field')
def contact_form(request, form_class=ContactForm)
...

Exception message:
AttributeError at /contact/
'str' object has no attribute 'module'
Request Method: GET
Request URL: http://127.0.0.1:8000/contact/
Exception Type: AttributeError
Exception Value:
'str' object has no attribute 'module'
Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/functools.py in update_wrapper, line 33

@sunlightlabs
Copy link

fixed in latest commit and docs now suggest use of explicitly naming field_name arg

@montylounge
Copy link
Author

thx!

This issue was closed.
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