mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-10 19:57:15 +03:00
Typo fixes (#1459)
* Fix Star Wars spaceship name * Fix some typos in comments * Typo fixes * More typo fixes
This commit is contained in:
parent
e49a01c189
commit
67def2e074
|
@ -6,7 +6,7 @@ Graphene-Django can be customised using settings. This page explains each settin
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Add settings to your Django project by creating a Dictonary with name ``GRAPHENE`` in the project's ``settings.py``:
|
Add settings to your Django project by creating a Dictionary with name ``GRAPHENE`` in the project's ``settings.py``:
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,7 @@
|
||||||
"fields": {
|
"fields": {
|
||||||
"category": 3,
|
"category": 3,
|
||||||
"name": "Newt",
|
"name": "Newt",
|
||||||
"notes": "Braised and Confuesd"
|
"notes": "Braised and Confused"
|
||||||
},
|
},
|
||||||
"model": "ingredients.ingredient",
|
"model": "ingredients.ingredient",
|
||||||
"pk": 5
|
"pk": 5
|
||||||
|
|
|
@ -28,7 +28,7 @@ def initialize():
|
||||||
|
|
||||||
# Yeah, technically it's Corellian. But it flew in the service of the rebels,
|
# Yeah, technically it's Corellian. But it flew in the service of the rebels,
|
||||||
# so for the purposes of this demo it's a rebel ship.
|
# so for the purposes of this demo it's a rebel ship.
|
||||||
falcon = Ship(id="4", name="Millenium Falcon", faction=rebels)
|
falcon = Ship(id="4", name="Millennium Falcon", faction=rebels)
|
||||||
falcon.save()
|
falcon.save()
|
||||||
|
|
||||||
homeOne = Ship(id="5", name="Home One", faction=rebels)
|
homeOne = Ship(id="5", name="Home One", faction=rebels)
|
||||||
|
|
|
@ -40,7 +40,7 @@ def test_mutations():
|
||||||
{"node": {"id": "U2hpcDox", "name": "X-Wing"}},
|
{"node": {"id": "U2hpcDox", "name": "X-Wing"}},
|
||||||
{"node": {"id": "U2hpcDoy", "name": "Y-Wing"}},
|
{"node": {"id": "U2hpcDoy", "name": "Y-Wing"}},
|
||||||
{"node": {"id": "U2hpcDoz", "name": "A-Wing"}},
|
{"node": {"id": "U2hpcDoz", "name": "A-Wing"}},
|
||||||
{"node": {"id": "U2hpcDo0", "name": "Millenium Falcon"}},
|
{"node": {"id": "U2hpcDo0", "name": "Millennium Falcon"}},
|
||||||
{"node": {"id": "U2hpcDo1", "name": "Home One"}},
|
{"node": {"id": "U2hpcDo1", "name": "Home One"}},
|
||||||
{"node": {"id": "U2hpcDo5", "name": "Peter"}},
|
{"node": {"id": "U2hpcDo5", "name": "Peter"}},
|
||||||
]
|
]
|
||||||
|
|
|
@ -44,7 +44,7 @@ def EventFilterSet():
|
||||||
"name": ["exact", "contains"],
|
"name": ["exact", "contains"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# Those are actually usable with our Query fixture bellow
|
# Those are actually usable with our Query fixture below
|
||||||
tags__contains = ArrayFilter(field_name="tags", lookup_expr="contains")
|
tags__contains = ArrayFilter(field_name="tags", lookup_expr="contains")
|
||||||
tags__overlap = ArrayFilter(field_name="tags", lookup_expr="overlap")
|
tags__overlap = ArrayFilter(field_name="tags", lookup_expr="overlap")
|
||||||
tags = ArrayFilter(field_name="tags", lookup_expr="exact")
|
tags = ArrayFilter(field_name="tags", lookup_expr="exact")
|
||||||
|
|
|
@ -789,7 +789,7 @@ def test_order_by():
|
||||||
|
|
||||||
query = """
|
query = """
|
||||||
query NodeFilteringQuery {
|
query NodeFilteringQuery {
|
||||||
allReporters(orderBy: "-firtsnaMe") {
|
allReporters(orderBy: "-firstname") {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
firstName
|
firstName
|
||||||
|
@ -802,7 +802,7 @@ def test_order_by():
|
||||||
assert result.errors
|
assert result.errors
|
||||||
|
|
||||||
|
|
||||||
def test_order_by_is_perserved():
|
def test_order_by_is_preserved():
|
||||||
class ReporterType(DjangoObjectType):
|
class ReporterType(DjangoObjectType):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Reporter
|
model = Reporter
|
||||||
|
|
|
@ -43,7 +43,7 @@ def get_filtering_args_from_filterset(filterset_class, type):
|
||||||
isinstance(filter_field, TypedFilter)
|
isinstance(filter_field, TypedFilter)
|
||||||
and filter_field.input_type is not None
|
and filter_field.input_type is not None
|
||||||
):
|
):
|
||||||
# First check if the filter input type has been explicitely given
|
# First check if the filter input type has been explicitly given
|
||||||
field_type = filter_field.input_type
|
field_type = filter_field.input_type
|
||||||
else:
|
else:
|
||||||
if name not in filterset_class.declared_filters or isinstance(
|
if name not in filterset_class.declared_filters or isinstance(
|
||||||
|
|
|
@ -4,7 +4,7 @@ from graphene.types.inputobjecttype import InputObjectType
|
||||||
from graphene.utils.str_converters import to_camel_case
|
from graphene.utils.str_converters import to_camel_case
|
||||||
|
|
||||||
from ..converter import BlankValueField
|
from ..converter import BlankValueField
|
||||||
from ..types import ErrorType # noqa Import ErrorType for backwards compatability
|
from ..types import ErrorType # noqa Import ErrorType for backwards compatibility
|
||||||
from .mutation import fields_for_form
|
from .mutation import fields_for_form
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class DjangoFormInputObjectType(InputObjectType):
|
||||||
and isinstance(object_type._meta.fields[name], BlankValueField)
|
and isinstance(object_type._meta.fields[name], BlankValueField)
|
||||||
):
|
):
|
||||||
# Field type BlankValueField here means that field
|
# Field type BlankValueField here means that field
|
||||||
# with choises have been converted to enum
|
# with choices have been converted to enum
|
||||||
# (BlankValueField is using only for that task ?)
|
# (BlankValueField is using only for that task ?)
|
||||||
setattr(cls, name, cls.get_enum_cnv_cls_instance(name, object_type))
|
setattr(cls, name, cls.get_enum_cnv_cls_instance(name, object_type))
|
||||||
elif (
|
elif (
|
||||||
|
|
|
@ -97,7 +97,7 @@ class CNNReporter(Reporter):
|
||||||
|
|
||||||
class APNewsReporter(Reporter):
|
class APNewsReporter(Reporter):
|
||||||
"""
|
"""
|
||||||
This class only inherits from Reporter for testing multi table inheritence
|
This class only inherits from Reporter for testing multi table inheritance
|
||||||
similar to what you'd see in django-polymorphic
|
similar to what you'd see in django-polymorphic
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user