Opened 18 years ago
Closed 16 years ago
#6371 closed (fixed)
several decorators don't work with bound methods
| Reported by: | Gary Wilson | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Other) | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Similar to #4376, there are several other decorators that don't work with bound methods. A few that I noticed were cache_page, cache_control, and never_cache from django.views.decorators.cache. cache_page uses decorator_from_middleware, and other decorators created with this "decorator generator" have the same problem. They are django.views.decorators.gzip.gzip_page and django.views.decorators.http.conditional_page.
There might be others lurking out there...
Change History (4)
comment:1 by , 18 years ago
comment:2 by , 17 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 16 years ago
This also applies to the new etag, last_modified, and condition decorators.
comment:4 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
(In [11586]) Fixed #6371 - several decorators don't work with bound methods.
This involved changing the way the internal function
decorator_from_middleware works slightly, breaking some code that relied on
the old behaviour. As a result, it is much simpler, but cache_page has been
made slightly more complex to cope with the change.
@cache_page works for shure, just tested it last night