mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 07:56:06 -03:30
get organizations API working, hello REST world!
This commit is contained in:
@@ -12,13 +12,17 @@
|
|||||||
- vars/vars.yml
|
- vars/vars.yml
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
- name: remove python-dateutils package if installed
|
||||||
|
yum: name=python-dateutils15 state=removed
|
||||||
|
|
||||||
- name: install database packages from yum
|
- name: install packages from yum
|
||||||
action: yum name=$item state=installed
|
yum: name=$item state=installed
|
||||||
with_items:
|
with_items:
|
||||||
- postgresql # database client
|
- postgresql # database client
|
||||||
- postgresql-server # database server
|
- postgresql-server # database server
|
||||||
- python-psycopg2 # database library
|
- python-psycopg2 # database library
|
||||||
|
- python-lxml # xml for ?format=xml instead of json (optional)
|
||||||
|
|
||||||
- name: install python modules from pip
|
- name: install python modules from pip
|
||||||
pip: requirements=${working_dir}/requirements.txt
|
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 import settings
|
||||||
from django.conf.urls import *
|
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('',
|
urlpatterns = patterns('',
|
||||||
# (r'^', fooooooo),
|
(r'', include(v1_api.urls)),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ INSTALLED_APPS = (
|
|||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'lib.main',
|
'lib.main',
|
||||||
|
'lib.api',
|
||||||
'south',
|
'south',
|
||||||
# not yet compatible with Django 1.5 unless using version from github
|
# not yet compatible with Django 1.5 unless using version from github
|
||||||
# 'devserver',
|
# 'devserver',
|
||||||
|
|||||||
@@ -6,3 +6,4 @@ django-jsonfield==0.9.2
|
|||||||
django-tastypie==0.9.12
|
django-tastypie==0.9.12
|
||||||
ipython==0.13.1
|
ipython==0.13.1
|
||||||
South==0.7.6
|
South==0.7.6
|
||||||
|
python-dateutil==1.5
|
||||||
|
|||||||
Reference in New Issue
Block a user