Skip to content

Commit

Permalink
Add ContentFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
dralley committed Dec 11, 2018
1 parent 4a28506 commit 9a02c75
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pulp_plugin_template/app/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
from . import models, serializers, tasks


class PluginTemplateContentFilter(core.ContentFilter):
"""
FilterSet for FileContent.
"""

class Meta:
model = models.PluginTemplateContent
fields = [
# ...
]


class PluginTemplateContentViewSet(core.ContentViewSet):
"""
A ViewSet for PluginTemplateContent.
Expand All @@ -33,6 +45,7 @@ class PluginTemplateContentViewSet(core.ContentViewSet):
endpoint_name = 'plugin-template'
queryset = models.PluginTemplateContent.objects.all()
serializer_class = serializers.PluginTemplateContentSerializer
filterset_class = PluginTemplateContentFilter


class PluginTemplateRemoteViewSet(core.RemoteViewSet):
Expand Down

0 comments on commit 9a02c75

Please sign in to comment.