summaryrefslogtreecommitdiff
path: root/tests/regressiontests/decorators
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2012-12-29Removed legacy ways of calling cache_page.Aymeric Augustin
2012-08-11[py3] Various minor syntax fixes in the test suiteClaude Paroz
2012-05-12Replaced im_func and im_self by __func__ and __self__.Claude Paroz
The new names are Python 3 compatible.
2012-05-03Made warning assertions work with or without -Wall python switchClaude Paroz
2012-05-03Used catch_warnings instead of save/restore methods. Refs #17049.Claude Paroz
2012-05-03Fixed #18042 -- Advanced deprecation warnings.Aymeric Augustin
Thanks Ramiro for the patch.
2012-02-09Fixed #15840 -- Wrapped inner function of the condition decorator with ↵Jannis Leidel
functools.wraps to follow best practices. Thanks, zsiciarz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17470 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13Convert much of the regression tests to use absolute imports. There's still ↵Alex Gaynor
work to be done though. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-08Deprecated legacy ways of calling cache_pageLuke Plant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16338 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-30Fixed #14261 - Added clickjacking protection (X-Frame-Options header)Luke Plant
Many thanks to rniemeyer for the patch! git-svn-id: http://code.djangoproject.com/svn/django/trunk@16298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-23Refactoring of 'fully_decorated' for clarity and removal of duplication.Luke Plant
Also allows re-use of 'full_decorator' if we need it. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-28Fixed #15637 -- Added a require_safe decorator for views to accept GET or ↵Jannis Leidel
HEAD. Thanks, aaugustin and Julien. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16115 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28Made a bunch of simplifications now that we don't support Python 2.4Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Updated test assertions that have been deprecated by the move to unittest2. ↵Russell Keith-Magee
In summary, this means: assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21Fixed a bug with method_decorator not preserving the attributes of the ↵Luke Plant
wrapped method, which is important for decorators like csrf_exempt git-svn-id: http://code.djangoproject.com/svn/django/trunk@14311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21Removed old code with Python 2.3 compatibilityLuke Plant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft ↵Russell Keith-Magee
patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-21Fixed #12019 - backwards compatibility issues with cache_page decorator.Luke Plant
Thanks to rokclimb15 for the report, and j4mie/rokclimb15 for the patches. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04Fixed #12164 -- Removed the Python 2.3 compatibility imports and ↵Russell Keith-Magee
workarounds. Thanks to timo and claudep for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-09Fixed #12804 - regression with decorating admin views.Luke Plant
This is a BACKWARDS INCOMPATIBLE change, because it removes the flawed 'auto_adapt_to_methods' decorator, and replaces it with 'method_decorator' which must be applied manually when necessary, as described in the 1.2 release notes. For users of 1.1 and 1.0, this affects the decorators: * login_required * permission_required * user_passes_test For those following trunk, this also affects: * csrf_protect * anything created with decorator_from_middleware If a decorator does not depend on the signature of the function it is supposed to decorate (for example if it only does post-processing of the result), it will not be affected. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-28Added 'key_prefix' keyword argument to cache_page()Luke Plant
This was available before r11586, but undocumented. It has now been re-added with documentation and explicit support, as it seems like a useful feature and people were using it before. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-26Corrected regressions introduced in r11586 and r11593Luke Plant
I read the order of arguments in the docs incorrectly, doh! git-svn-id: http://code.djangoproject.com/svn/django/trunk@11594 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-21Fixed #6371 - several decorators don't work with bound methods.Luke Plant
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. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01Fixed #9474: user_passes_test may now be applied multiple times.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-26Fixed a missing __init__.py from [7153]Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-25Fixed #5701 -- Fixed decorators to take the name, attributes, and docstring ↵Gary Wilson Jr
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