class based views
sertac opened this issue · 1 comments
sertac commented
AttributeError at /
'function' object has no attribute 'as_view'
i'm having above error when i try to use decorator within my class based view
merenbach commented
@sertac, were you ever able to solve this? The following (simplified) works for me in urls.py
for an app:
# ... various includes ....
from honeypot.decorators import check_honeypot
urlpatterns = patterns('',
url(r'^$', check_honeypot(ContactView.as_view()), name='contact'),
# ... more urls ...
)