@@ -36,6 +36,7 @@ from djangoldp.models import Model
class Todo(Model):
name = models.CharField(max_length=255)
deadline = models.DateTimeField()
```
...
...
@@ -46,6 +47,7 @@ By default it will be "todos/" with an S for model called Todo
<Model>._meta.container_path = "/my-path/"
```
3.2. Configure field visibility (optional)
Note that at this stage you can limit access to certain fields of models using
...
...
@@ -134,14 +136,14 @@ list of ForeignKey, ManyToManyField, OneToOneField and their reverse relations.
In the following example, besides the urls `/members/` and `/members/<pk>/`, two other will be added to serve a container of the skills of the member: `/members/<pk>/skills/` and `/members/<pk>/skills/<pk>/`
From the 0.5 we added permissions check by default on every route, so you may encounter 400 errors code on your POST requests. You can disable those checks by specifying the permission_classes as an empty array in our URLs files.