Django

Code

Changeset 5631

Show
Ignore:
Timestamp:
07/07/07 13:39:23 (1 year ago)
Author:
mtredinnick
Message:

Corrected misleading comment from [5619]. Not sure what I was smoking at the
time.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/utils/decorators.py

    r5619 r5631  
    99    """ 
    1010    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. 
    1114        has_func = True 
    1215        try: 
     
    1821                has_func = False 
    1922        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. 
    2324            if has_func: 
    2425                args = (view_func,) + args