This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dusken-old/dusken/api/group.py
T
2013-05-19 16:19:03 +02:00

21 lines
513 B
Python

from tastypie.authorization import Authorization
from tastypie.resources import ModelResource, ALL
from dusken.models import Group
class GroupResource(ModelResource):
"""
This class provides following endpoints:
(1) /api/v1/group/
(2) /api/v1/group/{id}/
"""
class Meta:
queryset = Group.objects.all()
resource_name = 'group'
list_allowed_methods = [ 'get', 'post' ]
detail_allowed_methods = [ 'get', 'post' ]
authorization = Authorization() # TODO: for dev (VERY INSECURE)
filtering = {
}