get organizations API working, hello REST world!

This commit is contained in:
Michael DeHaan 2013-03-13 17:58:06 -04:00
parent 8b0401b924
commit 2cea592c6c
5 changed files with 16 additions and 3 deletions

View File

@ -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

View File

@ -0,0 +1 @@
from organizations import *

View File

@ -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)),
)

View File

@ -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',

View File

@ -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