diff options
| author | Eleni Lixourioti | 2014-11-15 14:27:41 +0000 | 
|---|---|---|
| committer | Eleni Lixourioti | 2014-11-15 14:27:41 +0000 | 
| commit | 1aa77830955dcdf829f65a9001b6b8900dfc8755 (patch) | |
| tree | 1f6d0bea3c0fe720a298b2da177bb91e8a74a19c /rest_framework/compat.py | |
| parent | afaa52a378705b7f0475d5ece04a2cf49af4b7c2 (diff) | |
| parent | 88008c0a687219e3104d548196915b1068536d74 (diff) | |
| download | django-rest-framework-1aa77830955dcdf829f65a9001b6b8900dfc8755.tar.bz2 | |
Merge branch 'version-3.1' of github.com:tomchristie/django-rest-framework into oauth_as_package
Conflicts:
	.travis.yml
Diffstat (limited to 'rest_framework/compat.py')
| -rw-r--r-- | rest_framework/compat.py | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/rest_framework/compat.py b/rest_framework/compat.py index bc5719ef..6c243462 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -39,6 +39,17 @@ except ImportError:      django_filters = None +if django.VERSION >= (1, 6): +    def clean_manytomany_helptext(text): +        return text +else: +    # Up to version 1.5 many to many fields automatically suffix +    # the `help_text` attribute with hardcoded text. +    def clean_manytomany_helptext(text): +        if text.endswith(' Hold down "Control", or "Command" on a Mac, to select more than one.'): +            text = text[:-69] +        return text +  # Django-guardian is optional. Import only if guardian is in INSTALLED_APPS  # Fixes (#1712). We keep the try/except for the test suite.  guardian = None | 
