barseghyanartur / django-mongoengine-filter

django-filter for MongoEngine
https://pypi.org/project/django-mongoengine-filter/
13 stars 7 forks source link

TypeError: __init__() got an unexpected keyword argument 'request' #7

Closed jesusch closed 1 year ago

jesusch commented 4 years ago

django-filter has a different constructor for BaseFilterSet https://github.com/carltongibson/django-filter/blob/master/django_filters/filterset.py#L190

I find it a bit odd as it's using '*' as parameter oO My local solution for now was:

    def __init__(self, data=None, queryset=None, prefix=None, strict=None, *args, **kwargs):
        return super().__init__(data=None, queryset=None, prefix=None, strict=None)
barseghyanartur commented 4 years ago

For the reference, work on this is done in sync-api branch.

Some refs (for clarification):

Any help on this is appreciated.

oussjarrousse commented 1 year ago

I believe this issue has been resolved in the 0.4.0 release in Dec 25, 2022. Current definition of BaseFilterSet.init() has the * separator, and is compatible with django-filter.

You will find the function definition here: https://github.com/barseghyanartur/django-mongoengine-filter/blob/master/django_mongoengine_filter/filterset.py#L189 in the latest release

@barseghyanartur you can close this issue :-)

oussjarrousse commented 1 year ago

Very low hanging fruit!