예제 #1
0
파일: views.py 프로젝트: rbillings/normandy
class RecipeFilters(django_filters.FilterSet):
    enabled = EnabledStateFilter()
    action = django_filters.CharFilter(field_name="latest_revision__action__name")
    channels = CharSplitFilter("latest_revision__channels__slug")
    locales = CharSplitFilter("latest_revision__locales__code")
    countries = CharSplitFilter("latest_revision__countries__code")

    class Meta:
        model = Recipe
        fields = ["action", "enabled", "latest_revision__action"]
예제 #2
0
class RecipeFilters(django_filters.FilterSet):
    enabled = EnabledStateFilter()
    action = django_filters.CharFilter(field_name="latest_revision__action__name")
    channels = CharSplitFilter("latest_revision__channels__slug")
    locales = CharSplitFilter("latest_revision__locales__code")
    countries = CharSplitFilter("latest_revision__countries__code")
    only_baseline_capabilities = BaselineCapabilitiesFilter(default_only_baseline=False)

    class Meta:
        model = Recipe
        fields = ["action", "enabled", "latest_revision__action"]
예제 #3
0
파일: views.py 프로젝트: mythmon/normandy
class RecipeFilters(django_filters.FilterSet):
    enabled = EnabledStateFilter()
    action = django_filters.CharFilter(
        field_name="latest_revision__action__name")
    experimenter_slug = django_filters.CharFilter(
        field_name="latest_revision__experimenter_slug")
    channels = CharSplitFilter("latest_revision__channels__slug")
    locales = CharSplitFilter("latest_revision__locales__code")
    countries = CharSplitFilter("latest_revision__countries__code")
    uses_only_baseline_capabilities = BaselineCapabilitiesFilter()
    filter_object = FilterObjectFieldFilter()

    class Meta:
        model = Recipe
        fields = [
            "action", "enabled", "latest_revision__action", "experimenter_slug"
        ]