Changeset 5631
- Timestamp:
- 07/07/07 13:39:23 (1 year ago)
- Files:
-
- django/trunk/django/utils/decorators.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/utils/decorators.py
r5619 r5631 9 9 """ 10 10 def _decorator_from_middleware(*args, **kwargs): 11 # For historical reasons, these "decorators" are also called as 12 # dec(func, *args) instead of dec(*args)(func). We handle both forms 13 # for backwards compatibility. 11 14 has_func = True 12 15 try: … … 18 21 has_func = False 19 22 if not (has_func and isinstance(view_func, types.FunctionType)): 20 # For historical reasons, these decorators are also called as 21 # dec(func, *args) instead of dec(*args)(func). This branch handles 22 # the backwards compatibility. 23 # We are being called as a decorator. 23 24 if has_func: 24 25 args = (view_func,) + args
