Skip to content

Commit

Permalink
Merge pull request #45 from miki725/default-backend
Browse files Browse the repository at this point in the history
setting sqlalchemy backend as default
  • Loading branch information
miki725 authored Aug 17, 2017
2 parents d9428fe + c36e680 commit f1d904e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions url_filter/filtersets/plain.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import six
from django import forms

from ..backends.plain import PlainFilterBackend
from ..exceptions import SkipFilter
from ..filters import Filter
from ..utils import SubClassDict, dictify
Expand All @@ -31,6 +32,7 @@ class PlainModelFilterSet(BaseModelFilterSet):
The filterset can be configured via ``Meta`` class attribute,
very much like Django's ``ModelForm`` is configured.
"""
filter_backend_class = PlainFilterBackend

def _build_state(self):
return dictify(self.Meta.model)
Expand Down
1 change: 1 addition & 0 deletions url_filter/filtersets/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class SQLAlchemyModelFilterSet(BaseModelFilterSet):
The filterset can be configured via ``Meta`` class attribute,
very much like Django's ``ModelForm`` is configured.
"""
filter_backend_class = SQLAlchemyFilterBackend

def _build_filter(self, name, fields):
field = fields[name]
Expand Down

0 comments on commit f1d904e

Please sign in to comment.