mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
17 lines
417 B
Python
17 lines
417 B
Python
# 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 Users(ModelResource):
|
|
|
|
class Meta:
|
|
queryset = models.User.objects.all()
|
|
resource_name = 'users'
|
|
authentication = BasicAuthentication()
|
|
authorization = AcomAuthorization()
|
|
|
|
|