Slumber is a RESTful data connector that can be used to make proper RESTful data services from Django systems.
Slumber is intended to help you build large complex REST based applications where you have multiple services that must communicate to implement a full system. Slumber is a perfect way to write the server side for your AngularJS application.
Slumber has two parts, the server and client sides. A RESTful service can be used by just adding the server side to an existing Django system. The client side is useful where you want to connect to the data service from another Python system, or even if you just want to decouple the persistence from the user interface layers within Django.
Slumber is available on pypi. To install it use:
pip install django-slumber
In order to start to use Slumber on the server side you simply need to include it in your
urls.py with something like this:
This is all you need to do to start to manage your data with Slumber. You can now visit the Slumber starting URL on your project via http://localhost:8000/slumber/. If everything is set up correctly you should see a list of the Django applications you've installed.
Slumber is based around a single entry point, called the service directory. This is where you get to when you hit the main Slumber URL. Typically each service is a separate Django project running a part of a larger system. This service layer is however optional. Simple REST services won't require them.
The next layer down consists of the Django applications. Slumber will expose these automatically for you and relies on the Django permissioning system to control access.