Commit c61127fda5ad88a5d89fd7391dcc3c6c0bbad30c
Committed by
Claude Paroz
1 parent
02474a00
Used python_2_unicode_compatible from six.
django.utils.encoding.python_2_unicode_compatible() alias was removed in Django 3.0.
Showing
4 changed files
with
4 additions
and
4 deletions
| @@ -7,8 +7,8 @@ from django.contrib.sites.models import Site | @@ -7,8 +7,8 @@ from django.contrib.sites.models import Site | ||
| 7 | from django.db import models | 7 | from django.db import models |
| 8 | from django.urls import reverse | 8 | from django.urls import reverse |
| 9 | from django.utils import timezone | 9 | from django.utils import timezone |
| 10 | -from django.utils.encoding import python_2_unicode_compatible | ||
| 11 | from django.utils.translation import ugettext_lazy as _ | 10 | from django.utils.translation import ugettext_lazy as _ |
| 11 | +from six import python_2_unicode_compatible | ||
| 12 | 12 | ||
| 13 | from .managers import CommentManager | 13 | from .managers import CommentManager |
| 14 | 14 |
| 1 | from django.conf import settings | 1 | from django.conf import settings |
| 2 | from django.db import models | 2 | from django.db import models |
| 3 | from django.utils import timezone | 3 | from django.utils import timezone |
| 4 | -from django.utils.encoding import python_2_unicode_compatible | ||
| 5 | from django.utils.translation import ugettext_lazy as _ | 4 | from django.utils.translation import ugettext_lazy as _ |
| 5 | +from six import python_2_unicode_compatible | ||
| 6 | 6 | ||
| 7 | from .abstracts import ( | 7 | from .abstracts import ( |
| 8 | COMMENT_MAX_LENGTH, BaseCommentAbstractModel, CommentAbstractModel, | 8 | COMMENT_MAX_LENGTH, BaseCommentAbstractModel, CommentAbstractModel, |
| @@ -42,5 +42,5 @@ setup( | @@ -42,5 +42,5 @@ setup( | ||
| 42 | packages=find_packages(exclude=['tests', 'tests.*']), | 42 | packages=find_packages(exclude=['tests', 'tests.*']), |
| 43 | include_package_data=True, | 43 | include_package_data=True, |
| 44 | test_suite='tests.runtests.main', | 44 | test_suite='tests.runtests.main', |
| 45 | - install_requires=['Django>=1.11'] | 45 | + install_requires=['Django>=1.11', 'six'] |
| 46 | ) | 46 | ) |
| @@ -6,7 +6,7 @@ more information. | @@ -6,7 +6,7 @@ more information. | ||
| 6 | from __future__ import unicode_literals | 6 | from __future__ import unicode_literals |
| 7 | 7 | ||
| 8 | from django.db import models | 8 | from django.db import models |
| 9 | -from django.utils.encoding import python_2_unicode_compatible | 9 | +from six import python_2_unicode_compatible |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | @python_2_unicode_compatible | 12 | @python_2_unicode_compatible |
Please
register
or
login
to post a comment