Gary Wilson Jr
d0032458a2
Fixed #6679 -- In `decorator_from_middleware`, don't unpack arguments when calling a middleware's
...
`process_view` method, thanks Gulopine.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-17 17:47:34 +00:00
Gary Wilson Jr
5ca0b9203b
Fixed #5701 -- Fixed decorators to take the name, attributes, and docstring of the function they decorate by adding a modified version of the `functools.wraps` function from Python 2.5. `wraps` has been altered to work with Django's `curry` function and with Python 2.3, which doesn't allow assignment of a function's `__name__` attribute. This fixes severaly annoyances, such as the online documentation for template filters served by the admin app. This change is backwards incompatible if, for some reason, you were relying on the name of a Django decorator instead of the function it decorates.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-25 06:02:35 +00:00
Malcolm Tredinnick
4c011e6f36
Corrected misleading comment from [5619]. Not sure what I was smoking at the
...
time.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-07 18:39:23 +00:00
Malcolm Tredinnick
05de381512
Fixed #1015 -- Fixed decorator_from_middleware to return a real decorator even
...
when arguments are given. This looks a bit ugly, but it's fully backwards
compatible and all the extra work is done at import time, so it shouldn't have
any real performance impact.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-05 11:10:27 +00:00
Adrian Holovaty
cc3660c07d
Fixed #878 -- URLconf regex captures no longer have to be named groups. Old URLconfs (with named groups) still work. This is backwards-incompatible if you've defined custom middleware with a process_view function. See http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1470 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-27 22:08:51 +00:00
Adrian Holovaty
d35d1f1581
Fixed bug in django.utils.decorators.decorator_from_middleware -- it wasn't raising exceptions. Refs #641
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-04 14:48:57 +00:00
Adrian Holovaty
a2e26150b7
Fixed #616 -- Added a process_exception() hook to middleware framework. Thanks, Hugo
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@880 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-15 02:20:35 +00:00
Adrian Holovaty
f258a8fce2
Fixed #600 -- decorator_from_middleware now handles process_view. Thanks, Hugo
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-10 13:51:58 +00:00
Adrian Holovaty
71564b4349
Added django.utils.decorators, from Hugo's #580 patch. Refs #580 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@807 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-08 21:44:37 +00:00