mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-24 02:52:04 +03:00
Resolve RemovedInDjango40Warning warnings
* gql/graphene-django/graphene_django/tests/test_converter.py:175: RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy(). * graphene-django/graphene_django/utils/utils.py:28: RemovedInDjango40Warning: force_text() is deprecated in favor of force_str().
This commit is contained in:
parent
14d0414f86
commit
549dde1db3
|
@ -1,7 +1,7 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
CHOICES = ((1, "this"), (2, _("that")))
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
from collections import namedtuple
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from graphene import NonNull
|
||||
from py.test import raises
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import inspect
|
|||
|
||||
from django.db import models
|
||||
from django.db.models.manager import Manager
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.encoding import force_str
|
||||
from django.utils.functional import Promise
|
||||
|
||||
from graphene.utils.str_converters import to_camel_case
|
||||
|
@ -25,7 +25,7 @@ def isiterable(value):
|
|||
|
||||
def _camelize_django_str(s):
|
||||
if isinstance(s, Promise):
|
||||
s = force_text(s)
|
||||
s = force_str(s)
|
||||
return to_camel_case(s) if isinstance(s, str) else s
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user