Opened 15 years ago
Last modified 14 years ago
#12019 closed
@cache_page with no args causes AttributeError with wsgi — at Initial Version
Reported by: | rokclimb15 | Owned by: | nobody |
---|---|---|---|
Component: | Core (Cache system) | Version: | dev |
Severity: | Keywords: | @cache_page | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When calling @cache_page with no arguments I get the following exception while running mod_wsgi. I'm not sure if that usage is valid. I would assume it would use CACHE_MIDDLEWARE_SECONDS if nothing is provided, but I can't find anything about that in docs or see any evidence of that in the code. If that argument is required, I think a clear exception should be thrown rather than this one when running under mod_wsgi.
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/django/core/handlers/base.py", line 92, in get_response
response = callback(request, *callback_args, callback_kwargs)
File "/usr/lib/python2.6/dist-packages/django/utils/decorators.py", line 33, in adapt
return MethodDecoratorAdaptor(decorator, func)
File "/usr/lib/python2.6/dist-packages/django/utils/decorators.py", line 15, in init
update_wrapper(self, func)
File "/usr/lib/python2.6/functools.py", line 33, in update_wrapper
setattr(wrapper, attr, getattr(wrapped, attr))
AttributeError: 'WSGIRequest' object has no attribute 'name'