mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-08 00:51:48 -05:00
Start adding tastypie subresources
This commit is contained in:
16
lib/api/resources/projects.py
Normal file
16
lib/api/resources/projects.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# myapp/api.py
|
||||
|
||||
from tastypie.resources import ModelResource
|
||||
from tastypie.authentication import BasicAuthentication
|
||||
from lib.api.auth import AcomAuthorization
|
||||
import lib.main.models as models
|
||||
|
||||
class Projects(ModelResource):
|
||||
|
||||
class Meta:
|
||||
queryset = models.Project.objects.all()
|
||||
resource_name = 'projects'
|
||||
authentication = BasicAuthentication()
|
||||
authorization = AcomAuthorization()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user