mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
get organizations API working, hello REST world!
This commit is contained in:
parent
8b0401b924
commit
2cea592c6c
@ -12,13 +12,17 @@
|
||||
- vars/vars.yml
|
||||
|
||||
tasks:
|
||||
|
||||
- name: remove python-dateutils package if installed
|
||||
yum: name=python-dateutils15 state=removed
|
||||
|
||||
- name: install database packages from yum
|
||||
action: yum name=$item state=installed
|
||||
- name: install packages from yum
|
||||
yum: name=$item state=installed
|
||||
with_items:
|
||||
- postgresql # database client
|
||||
- postgresql-server # database server
|
||||
- python-psycopg2 # database library
|
||||
- python-lxml # xml for ?format=xml instead of json (optional)
|
||||
|
||||
- name: install python modules from pip
|
||||
pip: requirements=${working_dir}/requirements.txt
|
||||
|
||||
1
lib/api/resources/__init__.py
Normal file
1
lib/api/resources/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from organizations import *
|
||||
@ -1,6 +1,12 @@
|
||||
from django.conf import settings
|
||||
from django.conf.urls import *
|
||||
from tastypie.api import Api
|
||||
from lib.api.resources import Organizations
|
||||
|
||||
v1_api = Api(api_name='v1')
|
||||
v1_api.register(Organizations())
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
# (r'^', fooooooo),
|
||||
(r'', include(v1_api.urls)),
|
||||
)
|
||||
|
||||
@ -114,6 +114,7 @@ INSTALLED_APPS = (
|
||||
'django.contrib.sites',
|
||||
'django.contrib.staticfiles',
|
||||
'lib.main',
|
||||
'lib.api',
|
||||
'south',
|
||||
# not yet compatible with Django 1.5 unless using version from github
|
||||
# 'devserver',
|
||||
|
||||
@ -6,3 +6,4 @@ django-jsonfield==0.9.2
|
||||
django-tastypie==0.9.12
|
||||
ipython==0.13.1
|
||||
South==0.7.6
|
||||
python-dateutil==1.5
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user