-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
35 lines (26 loc) · 1.4 KB
/
README
File metadata and controls
35 lines (26 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Django REST interface
License: New BSD License
URL: http://code.google.com/p/django-rest-interface/
Contact: Andreas StuhlmŸller <andreas@stuhlmueller.info>
The django-rest-interface project includes two parts:
A) The REST interface: django_restapi
resource.Resource is the generic class for REST resources. Use
this class for resources that don't necessarily map 1:1 to Django
models. model_resource.Collection and model_resource.Entry are
specific implementations that map resources 1:1 to Django models.
receiver contains classes that allow you to modify the
content type that is expected by model resources for PUT/POST
submissions (e.g. form submission MIME types, XML, JSON, ...).
responder contains classes you can use to choose which type of
output format model resources return. For instance, add
"responder = XMLResponder()" to the constructor call of a
resource in urls.py in order to use XML as a data format.
authentication contains classes you can use to choose which
type of authentication is required to access your API.
For instance, add "authentication = HttpBasicAuthentication()"
to the constructor call of a resource in urls.py in order to use
HTTP Basic authentication. The default authfunc authenticates
username and password against django.contrib.auth.models.User.
B) Tests: django_restapi_tests
Contains API tests. Run "python ./manage.py test" in order
to execute the REST interface unit tests.