django-auto-api is an incredibly simple app that gives you a fully hyperlinked read-only API for all installed models in html, json, yaml, xml and csv. It only requires one line of code to be added to your project.
It is intended to demonstrate how django-serializers can easily be used to build web APIs. In particular, it shows that customizing how model relations are represented allows you to do powerful things such as using hyperlinking to represent relationships, rather than using the default primary key representation.
Installation
Install using pip:
pip install django-auto-api
Add the django-auto-api urls to your URLConf:
urlpatterns = patterns('',
...
url(r'^api/', include('autoapi.urls', namespace='autoapi')),
)
Running the example project
If you've cloned the project from the git repo, you can run a very simple example project:
./manage.py syncdb
./manage.py loaddata testfixture.json
./manage.py runserver
This runs an example API for a few models of contrib.contenttypes and contrib.auth.
What is new in this release:
- Fix homepage link in setup.py
Requirements:
- Python
- Django
- django-serializers
Comments not found