* Reset the global registry after each test (teardown)
* Create a settings fixtures that returns graphene_settings and resets
the graphene_settings after use (teardown)
* Convert test_mutation tests from unittests.TestCase to pytest
* Convert test_mutation PetType to a pet_type fixtures that reregisters
the type
* Keep original queryset on DjangoFilterConnectionField
The PR #796 broke DjangoFilterConnectionField making it always get the
raw queryset from the model to apply the filters in it.
This makes sure that the DjangoObjectType's .get_queryset is called,
keeping any filtering it might have made.
* Add regression test
* replace merge_queryset with resolve_queryset pattern
* skip double limit test
* Update graphene_django/fields.py
Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>
* yank skipped test
* fix bad variable ref
* add test for annotations
* add test for using queryset with django filters
* document ththat one should use defer instead of values with queysets and DjangoObjectTypes
* django-filter: resolve field along with lookup expression to properly resolve field
* bring back django-filter with method test
* remove dangling comment
* refactor based on better knowledge of django-filters
* Check for filters defined on base filterset classes
* Make python2.7 compatible and run black
* Add filter method and use filter in test
* Check article headline and reformat
* Create new fields and exclude options that are aliased to exclude_fields and only_fields
* Update docs
* Add some checking around fields and exclude definitions
* Add all fields option
* Update docs to include `__all__` option
* Actual order of fields is not stable
* Update docs/queries.rst
Co-Authored-By: Semyon Pupkov <semen.pupkov@gmail.com>
* Fix example code
* Format code
* Start raising PendingDeprecationWarnings for using only_fields and exclude_fields
* Update tests
* Get form field from Django model before defaulting to django-filter
* Add test
* Cleanup some flake8 warnings and pytest warnings
* Run isort and add black compatible config
* Include setup.py in black formatting
* Add new flake8 plugins and update errors to look for
* Fix duplicate test name
* Don't use mutable data structure
* Install all dev dependencies for flake8 and black tox envs
* Update travis and tox
* Use xenial distribution
* Don't install coveralls twice
* Add black and flake8 tox commands
* Remove Python 3.5 test for Django master
* Fix indent
* Ignore migrations
* Remove black for now
* Run black formatting (#668)
* Run black format
* Update makefile
* Add black to travis build
* Allow for use of either filter_fields or filterset_class
* Add tests to check that the behavior is similar to filter_fields
* Add documentation to show how to make use of the parameter
Since I didn't know why the `rel` attribute wasn't there in the first place, maybe it's better to use the `remote_field` only if it's there and leave `rel` as a default (i.e else).
After more digging than I expected (and planned), I'm 99% sure that the problem comes from `graphene_django`.
I found a [comment](16436f3751/django/db/models/fields/reverse_related.py (L4-L6)) in Django's source that refers to an attribute named `remote_field`, instead of `rel`.
It seamed to fix the problem for me without any other bugs (yet).