A hypermedia API framework for Django.
django-hyperadmin is a HATEOAS API framework for building resources in Django. Resources are anything that can be manipulated with forms and configuration of a Resource is similar to that of an Admin Model. While Resources offer a REST CRUD layer out of the box they are meant to power workflows that go beyond CRUD. Additionally Resources aim to be reusable throughout the web application and not to be limitted to a single API endpoint.
This is BETA
Supported Media Formats:
Headers control media type; “Accepts” and “Content-Type” control response and request format
We have a mailing list for general discussion and help: http://groups.google.com/group/django-hyperadmin/
Install hyperadmin into your python environment:
pip install django-hyperadmin
pip install -e git+git://github.com/webcube/django-hyperadmin.git#egg=django-hyperadmin
Put ‘hyperadmin’ into your INSTALLED_APPS section of your settings file.
Add to root url patterns:
Registering a model with hyperadmin:
import hyperadmin from hpyeradmin.resources.models import ModelResource, InlineModelResource from myapp.models import MyModel, ChildModel class ChildModelResource(InlineModelResource): model = ChildModel class MyModelResource(ModelResource): inlines = [ChildModelResource] list_display = ['name', 'number'] list_filter = ['timestamp', 'category'] hyperadmin.site.register(MyModel, MyModelResource)
The following registers the models from admin site (this is already done if you import from hyperadmin.urls):
from hyperadmin.resources.models.autload import DjangoCTModelAdminLoader from django.contrib.admin import site as admin_site from hyperadmin import site as root_endpoint loader = DjangoCTModelAdminLoader(root_endpoint, admin_site) loader.register_resources()
Visiting the api endpoint in a browser will let you browse the various hyberobjects made available through the resource. Clients may be installed on a different url.
Uses django templates to render an admin interface. Responsive design out of the box.
Uses REST calls and emberjs to render an admin interface.
Provides basic bindings to the Backbone API.
A dynamic API builder with a public HTML (template driven) client.