Basic API object creation. Auth still stubbed out.

This commit is contained in:
Michael DeHaan
2013-03-15 17:53:44 -04:00
parent 366fefe419
commit 91c8d122be
4 changed files with 80 additions and 6 deletions

View File

@@ -1,5 +1,8 @@
# myapp/api.py
from tastypie.resources import ModelResource
from lib.api.auth import AcomAuthentication, AcomAuthorization
import lib.main.models as models
class Organizations(ModelResource):
@@ -7,4 +10,7 @@ class Organizations(ModelResource):
class Meta:
queryset = models.Organization.objects.all()
resource_name = 'organizations'
authentication = AcomAuthentication()
authorization = AcomAuthorization()