Skip to content

Instantly share code, notes, and snippets.

@maryokhin
Created July 9, 2014 17:30
Show Gist options
  • Save maryokhin/4d666f4c4961a2ac8ea2 to your computer and use it in GitHub Desktop.
Save maryokhin/4d666f4c4961a2ac8ea2 to your computer and use it in GitHub Desktop.
class ChannelViewSet(GetObjectByKeyMixin, ModelViewSet):
"""
View for retrieving and updating channel information.
"""
queryset = Channel.objects.all()
serializer_class = ChannelSerializer
lookup_field = 'channel_key'
permission_classes = (ChannelPermission,)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment