Fix all known remaining compatibility issues with Django 1.7+.
Review Request #7423 — Created June 13, 2015 and submitted
This updates djblets.cache, djblets.datagrid, and djblets.gravatar to be compatible with newer versions of Django. These include pulling in some backwards-compatibility functions and updating to use the proper APIs. In the case of datagrids, the profile-related code has finally been removed. I've changed the logic to no longer assume the existence of User.get_profile(), and instead to allow subclasses to override a function that returns some object (a profile model, or something else) for use in data storage.
All unit tests pass on Django 1.6 and 1.8.
Description | From | Last Updated |
---|---|---|
'gravatar' imported but unused |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 0 |
reviewbot | |
undefined name 'InvalidCacheBackendError' |
reviewbot | |
undefined name 'InvalidCacheBackendError' |
reviewbot | |
undefined name 'parse_qsl' |
reviewbot | |
Col: 42 E226 missing whitespace around arithmetic operator |
reviewbot | |
This will now fail if profile is None. |
david | |
This docstring isn't in the right format. |
david | |
Single quotes. |
david | |
Single quotes. |
david | |
from __future__ import unicode_literals |
brennie | |
Can you expand this to say where it comes from? Also this should probably include django's LICENSE. |
david | |
Docstring formatting. |
brennie | |
single quotes. |
brennie | |
blank line between these. |
brennie | |
blank line between these. |
brennie |
- Change Summary:
-
- Fixed unused imports.
- Fixed missing imports.
- Fixed other misc. PyFlakes warnings.
- Commit:
-
0dcb47b6b6cd24769a9d614bcda2ceb4d25aa8b37071dbde2b0ec89d9a6b7e24c1676dd692d1358e
-
Tool: Pyflakes Processed Files: djblets/datagrid/grids.py djblets/gravatars/templatetags/tests.py djblets/cache/backend_compat.py djblets/util/compat/django/core/cache.py Tool: PEP8 Style Checker Processed Files: djblets/datagrid/grids.py djblets/gravatars/templatetags/tests.py djblets/cache/backend_compat.py djblets/util/compat/django/core/cache.py
- Change Summary:
-
Fixed the datagrid when there's no profile.
- Commit:
-
7071dbde2b0ec89d9a6b7e24c1676dd692d1358e1846e8387ee8bacf7c6a001f246a3641f288c253
-
Tool: Pyflakes Processed Files: djblets/datagrid/grids.py djblets/gravatars/templatetags/tests.py djblets/cache/backend_compat.py djblets/util/compat/django/core/cache.py Tool: PEP8 Style Checker Processed Files: djblets/datagrid/grids.py djblets/gravatars/templatetags/tests.py djblets/cache/backend_compat.py djblets/util/compat/django/core/cache.py
- Change Summary:
-
Added copyright headers for the Django files, and added info on where they came from.
- Commit:
-
1846e8387ee8bacf7c6a001f246a3641f288c253b468dd4bd56902942316e301562c60f1b35399ee
-
Tool: Pyflakes Processed Files: djblets/datagrid/grids.py djblets/gravatars/templatetags/tests.py djblets/cache/backend_compat.py djblets/util/compat/django/core/cache.py djblets/util/compat/django/core/files/locks.py Tool: PEP8 Style Checker Processed Files: djblets/datagrid/grids.py djblets/gravatars/templatetags/tests.py djblets/cache/backend_compat.py djblets/util/compat/django/core/cache.py djblets/util/compat/django/core/files/locks.py