Easy and powerful REST APIs for Django.
Table of Contents¶
- Filtering and Ordering
- Related Resources & Objects
- Related Resource Fields
- Default Behavior
- Access, Authorization & Permissions
- Forms & Validation
- Conduit Overview
Django-Conduit will automatically create your starting api based on your existing models.
Install via PyPI:
pip install django-conduit
Add the following to your INSTALLED_APPS:
INSTALLED_APPS = ( ... 'conduit', # 'api', )
Generate your API app by running the following:
./manage.py create_api [name_of_your_app] --folder=api
Uncomment ‘api’ in your INSTALLED_APPS
Point your main URLconf (normally project_name/urls.py) to your new ‘api’ app:
urlpatterns = patterns('', ... url(r'^api/', include('api.urls')), ... )
localhost:8000/api/v1/[model_name]to fetch one of your new resources!
All your new resources will be defined in api/views.py, and they will be registered with your Api object in api/urls.py.